/* =========================================================
 * 电商新品开品流程系统 · 全局样式
 * 设计语言：浅色后台 + 青绿主色（#0d9488）+ 石板灰中性色
 * ========================================================= */

:root {
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-soft: #ecfdf7;
    --ink: #0f172a;
    --ink-2: #334155;
    --ink-3: #64748b;
    --ink-4: #94a3b8;
    --line: #e2e8f0;
    --line-2: #eef2f7;
    --bg: #f4f7f9;
    --card: #ffffff;
    --ok: #059669;
    --ok-soft: #ecfdf5;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --bad: #dc2626;
    --bad-soft: #fef2f2;
    --info: #2563eb;
    --info-soft: #eff6ff;
    --muted-soft: #f1f5f9;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .10);
    --side-w: 240px;
    --top-h: 60px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font: 14px/1.65 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.svg-sprite { display: none; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }
.ico-sm { width: 15px; height: 15px; }
.ico-lg { width: 22px; height: 22px; }

.text-muted { color: var(--ink-4); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ---------------- 主框架 ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--side-w);
    flex: 0 0 var(--side-w);
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-2);
}
.side-logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: 15px; letter-spacing: .5px;
}
.side-brand-text strong { display: block; font-size: 14px; color: var(--ink); line-height: 1.3; }
.side-brand-text span { font-size: 11px; color: var(--ink-4); }

.side-scroll { flex: 1 1 auto; overflow-y: auto; padding: 10px 10px 20px; }
.side-title { font-size: 11px; color: var(--ink-4); padding: 14px 10px 6px; letter-spacing: .6px; }
.side-link {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--ink-2); font-size: 13.5px; position: relative;
}
.side-link:hover { background: var(--muted-soft); color: var(--ink); }
.side-link.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.side-link.is-active::before {
    content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.side-badge {
    margin-left: auto; min-width: 19px; height: 19px; padding: 0 6px;
    border-radius: 10px; background: var(--bad); color: #fff;
    font-size: 11px; font-weight: 600; display: grid; place-items: center;
}
.side-link.is-active .side-badge { background: var(--brand); }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: var(--top-h); background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px; position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.topbar-title small { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-4); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
    position: relative; width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; color: var(--ink-3);
    display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--muted-soft); color: var(--ink); }
.icon-btn .dot {
    position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
    background: var(--bad); color: #fff; border-radius: 9px; font-size: 10.5px;
    display: grid; place-items: center; font-weight: 600;
}

.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.user-chip .avatar {
    width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft);
    color: var(--brand-dark); display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.user-chip .who { font-size: 12.5px; color: var(--ink); line-height: 1.2; }
.user-chip .who small { display: block; color: var(--ink-4); font-size: 11px; }

.dropdown { position: relative; }
.dropdown-panel {
    position: absolute; right: 0; top: calc(100% + 8px); width: 320px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .3);
    display: none; z-index: 60; overflow: hidden;
}
.dropdown-panel.is-open { display: block; }
.dropdown-head { padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; }
.dropdown-list { max-height: 340px; overflow-y: auto; }
.dropdown-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.dropdown-item:hover { background: #f8fafc; }
.dropdown-item .t { font-size: 13px; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.dropdown-item .s { font-size: 11.5px; color: var(--ink-4); }
.dropdown-foot { padding: 8px 14px; text-align: center; font-size: 12.5px; background: #f8fafc; }

.content { padding: 20px; flex: 1 1 auto; min-width: 0; }

/* ---------------- 页头 ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; letter-spacing: -.2px; }
.page-head-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.page-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.back-link:hover { color: var(--brand); }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-size: 13px; font-weight: 500; cursor: pointer; background: #fff; color: var(--ink-2);
    transition: .15s; white-space: nowrap;
}
.btn:hover { color: var(--ink); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.btn-danger { border-color: #fecaca; color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn-ghost { background: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--muted-soft); }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 10px 20px; font-size: 14.5px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------------- 卡片 ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 14.5px; }
.card-head h2 small { color: var(--ink-4); font-weight: 400; font-size: 12px; margin-left: 6px; }
.card-head-aside { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.card-body { padding: 16px; }
.card-body.is-flush { padding: 0; }
.card-foot { padding: 11px 16px; border-top: 1px solid var(--line-2); background: #fcfdfe; font-size: 12.5px; color: var(--ink-3); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 25px; font-weight: 650; color: var(--ink); line-height: 1.25; margin-top: 4px; letter-spacing: -.5px; }
.stat-card .value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.stat-card .hint { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.stat-card.is-link:hover { border-color: var(--brand); transform: translateY(-1px); transition: .15s; }
.stat-card.is-ok .value { color: var(--ok); }
.stat-card.is-warn .value { color: var(--warn); }
.stat-card.is-bad .value { color: var(--bad); }
.stat-card.is-brand .value { color: var(--brand); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
    text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px;
    padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.tbl tbody tr:hover { background: #fbfdfe; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td strong { color: var(--ink); font-weight: 600; }
table.tbl .col-num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .sub { font-size: 11.5px; color: var(--ink-4); display: block; }
.tbl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-title a { color: var(--ink); font-weight: 600; }
.tbl-title a:hover { color: var(--brand); }

.empty-state { text-align: center; padding: 40px 16px; }
.empty-state-title { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.empty-state-desc { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; }
.empty-state-actions { margin-top: 12px; display: flex; gap: 8px; justify-content: center; }

/* ---------------- 徽标 ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
    background: var(--muted-soft); color: var(--ink-3); white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--muted-soft); color: var(--ink-4); }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group { margin-bottom: 14px; }
.form-group.is-half { grid-column: span 1; }
.form-group.is-full { grid-column: 1 / -1; }
.form-group > label { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 5px; }
.form-group > label .req { color: var(--bad); font-style: normal; margin-left: 3px; }
.form-control {
    width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: 13.5px; font-family: inherit; color: var(--ink); background: #fff; transition: .15s;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
.form-control[readonly] { background: #f8fafc; color: var(--ink-3); }
textarea.form-control { resize: vertical; line-height: 1.6; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-hint { font-size: 11.5px; color: var(--ink-4); margin-top: 4px; }
.form-static { padding: 8px 0; font-size: 13.5px; color: var(--ink); }

/* ---- 附件上传字段 ---- */
.upload-field { display: flex; flex-direction: column; }
.upload-current {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 10px; margin-bottom: 8px; background: var(--bg-2, #f7f8fa);
    border: 1px solid var(--line, #e5e6eb); border-radius: 8px; font-size: 12.5px;
}
.upload-thumb { display: inline-block; line-height: 0; }
.upload-thumb img {
    width: 68px; height: 68px; object-fit: cover;
    border-radius: 6px; border: 1px solid var(--line, #e5e6eb);
}
.upload-file { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; }
.upload-file a, a.link { color: var(--primary, #165dff); text-decoration: none; }
.upload-file a:hover, a.link:hover { text-decoration: underline; }
.upload-clear { display: inline-flex; align-items: center; gap: 4px; color: var(--bad, #f53f3f); cursor: pointer; }
.upload-clear input { margin: 0; }
.form-actions { display: flex; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 14px; }
.form-actions .extra { margin-left: auto; }
.form-section-title { font-size: 12.5px; font-weight: 600; color: var(--brand-dark); margin: 6px 0 10px; padding-left: 8px; border-left: 3px solid var(--brand); grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.sub-bar { display: block; height: 4px; border-radius: 2px; background: var(--line-2, #f0f1f5); margin-top: 4px; overflow: hidden; }
.sub-bar i { display: block; height: 100%; background: var(--brand, #165dff); border-radius: 2px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fcfdfe; }
.filter-bar .form-control { width: auto; min-width: 130px; padding: 6px 10px; font-size: 12.5px; }
.filter-bar .form-control.grow { min-width: 180px; flex: 1 1 180px; }
.filter-bar .sep { width: 1px; height: 20px; background: var(--line); }

/* ---------------- 字段网格（详情页） ---------------- */
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.field { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.field.is-wide { grid-column: 1 / -1; }
.field dt { flex: 0 0 108px; color: var(--ink-4); font-size: 12.5px; }
.field dd { margin: 0; font-size: 13px; color: var(--ink); flex: 1 1 auto; word-break: break-all; }
.field:last-child, .field:nth-last-child(2) { border-bottom: none; }

.kv { display: flex; gap: 8px; padding: 5px 0; font-size: 13px; }
.kv-label { color: var(--ink-4); flex: 0 0 92px; font-size: 12.5px; }
.kv-value { color: var(--ink); flex: 1 1 auto; }

/* ---------------- 流程条 ---------------- */
.flow-strip { display: flex; gap: 4px; overflow-x: auto; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.flow-node { flex: 1 0 auto; min-width: 92px; text-align: center; position: relative; padding: 0 2px; }
.flow-node::after { content: ""; position: absolute; top: 13px; right: -4px; width: 8px; height: 2px; background: var(--line); }
.flow-node:last-child::after { display: none; }
.flow-dot {
    width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 6px;
    display: grid; place-items: center; font-size: 12px; font-weight: 600;
    background: #f1f5f9; color: var(--ink-4); border: 1px solid var(--line);
}
.flow-node .flow-name { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.flow-node.is-done .flow-dot { background: var(--brand-soft); color: var(--brand-dark); border-color: #b8e6de; }
.flow-node.is-done .flow-name { color: var(--ink-2); }
.flow-node.is-current .flow-dot { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13, 148, 136, .14); }
.flow-node.is-current .flow-name { color: var(--brand-dark); font-weight: 600; }
.flow-node.is-rejected .flow-dot { background: var(--bad); color: #fff; border-color: var(--bad); box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.flow-node.is-rejected .flow-name { color: var(--bad); font-weight: 600; }

/* ---------------- 看板 ---------------- */
.kanban { display: grid; grid-template-columns: repeat(9, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 180px; }
.kanban-head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 6px; }
.kanban-head .n { font-size: 13px; font-weight: 600; color: var(--ink); }
.kanban-head .c { margin-left: auto; font-size: 11.5px; color: var(--ink-4); }
.kanban-head.is-overdue { background: var(--warn-soft); }
.kanban-list { padding: 8px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.kanban-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 10px; background: #fff; }
.kanban-card:hover { border-color: var(--brand); }
.kanban-card .t { font-size: 12.5px; font-weight: 600; color: var(--ink); display: block; }
.kanban-card .m { font-size: 11px; color: var(--ink-4); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.kanban-empty { font-size: 11.5px; color: var(--ink-4); text-align: center; padding: 12px 0; }

/* ---------------- 图表 ---------------- */
.bar-chart { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 86px 1fr auto; align-items: center; gap: 10px; }
.bar-row.is-link:hover .bar-label { color: var(--brand); }
.bar-label { font-size: 12.5px; color: var(--ink-2); }
.bar-track { height: 9px; border-radius: 6px; background: #f1f5f9; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #5eead4, #0d9488); }
.bar-fill.is-ok { background: linear-gradient(90deg, #6ee7b7, #059669); }
.bar-fill.is-warn { background: linear-gradient(90deg, #fcd34d, #d97706); }
.bar-fill.is-bad { background: linear-gradient(90deg, #fca5a5, #dc2626); }
.bar-value { font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.bar-note { grid-column: 2 / -1; font-size: 11px; color: var(--ink-4); margin-top: -4px; }
.bar-empty { font-size: 12.5px; color: var(--ink-4); text-align: center; padding: 24px 0; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.donut-hole { width: 96px; height: 96px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.donut-hole strong { font-size: 21px; color: var(--ink); display: block; line-height: 1.1; }
.donut-hole small { font-size: 11px; color: var(--ink-4); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; }
.donut-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.donut-legend-item i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.donut-legend-label { color: var(--ink-2); }
.donut-legend-value { margin-left: auto; color: var(--ink); font-weight: 600; }

/* ---------------- 时间轴 ---------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-dot { position: absolute; left: -22px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.tl-item.is-done .tl-dot { border-color: var(--brand); background: var(--brand); }
.tl-item.is-current .tl-dot { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13, 148, 136, .14); }
.tl-item.is-bad .tl-dot { border-color: var(--bad); background: var(--bad); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head strong { font-size: 13px; color: var(--ink); }
.tl-head .when { font-size: 11.5px; color: var(--ink-4); margin-left: auto; }
.tl-body { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------------- 提示框 ---------------- */
.hint-box { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 12.5px; line-height: 1.7; background: var(--info-soft); color: #1e40af; border: 1px solid #dbeafe; margin-bottom: 14px; }
.hint-box.is-warn { background: var(--warn-soft); color: #92400e; border-color: #fde68a; }
.hint-box.is-bad { background: var(--bad-soft); color: #991b1b; border-color: #fecaca; }
.hint-box.is-ok { background: var(--ok-soft); color: #065f46; border-color: #a7f3d0; }
.hint-box strong { font-weight: 600; }
.hint-box ul { margin: 6px 0 0; padding-left: 16px; list-style: disc; }
.hint-box li { margin-bottom: 2px; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.pager-links { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pager-links a, .pager-links span {
    min-width: 28px; height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line);
    display: inline-grid; place-items: center; color: var(--ink-2); background: #fff;
}
.pager-links a:hover { border-color: var(--brand); color: var(--brand-dark); }
.pager-links .is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager-links .is-disabled { opacity: .45; }
.pager-gap { border: none !important; background: none !important; }

/* ---------------- 登录页 ---------------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-visual {
    background: linear-gradient(150deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
    color: #fff; padding: 48px 54px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-visual::after {
    content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px;
    border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.login-visual h1 { color: #fff; font-size: 30px; line-height: 1.35; letter-spacing: -.5px; }
.login-visual p { color: rgba(255, 255, 255, .85); font-size: 13.5px; margin-top: 12px; max-width: 460px; }
.login-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; position: relative; z-index: 1; }
.login-step { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; }
.login-meta { position: relative; z-index: 1; font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.login-form-col { display: grid; place-items: center; padding: 30px; background: #fff; }
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 21px; margin-bottom: 4px; }
.login-card .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 22px; }
.login-error { background: var(--bad-soft); color: #991b1b; border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.login-tips { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 14px; }
.login-tips .t { font-size: 12px; color: var(--ink-4); margin-bottom: 8px; }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.role-chip { border: 1px solid var(--line); border-radius: 18px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; background: #fff; }
.role-chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
/* 登录页官网外链：左侧介绍栏（桌面）+ 表单下方（移动端也可见） */
.login-meta-links { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.login-meta-links a { color: #fff; border-bottom: 1px dashed rgba(255, 255, 255, .55); padding-bottom: 1px; }
.login-meta-links a:hover { border-bottom-style: solid; }
.login-meta-links .dot { opacity: .55; }
.login-links { margin-top: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-4); }
.login-links a { color: var(--ink-3); }
.login-links a:hover { color: var(--brand); }
.login-links .dot { color: var(--ink-4); }
.login-links .tel { color: var(--ink-4); }
/* 手机上隐藏左侧介绍栏后，用一行紧凑品牌栏替代，
   保证窄屏登录页仍有品牌信息 */
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-mobile-brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.login-mobile-brand-text strong { font-size: 15px; }
.login-mobile-brand-text span { font-size: 11.5px; color: var(--ink-4); }

/* ---------------- 移动端 ---------------- */
.mobile-page { padding: 14px; max-width: 560px; margin: 0 auto; }
.mobile-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; }
.mobile-tab { flex: 0 0 auto; padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); font-size: 12.5px; background: #fff; color: var(--ink-2); }
.mobile-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.mobile-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }

/* ---------------- 明细编辑表 ---------------- */
.items-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.items-table th { background: #f8fafc; padding: 7px 6px; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.items-table td { padding: 4px 5px; border: 1px solid var(--line-2); }
.items-table input, .items-table select { width: 100%; border: 1px solid transparent; background: transparent; padding: 5px 6px; font-size: 12.5px; border-radius: 6px; font-family: inherit; color: var(--ink); }
.items-table input:focus, .items-table select:focus { outline: none; border-color: var(--brand); background: #fff; }
.items-table .col-amount { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.items-table .row-del { color: var(--ink-4); cursor: pointer; padding: 4px; }
.items-table .row-del:hover { color: var(--bad); }
.items-table tfoot td { background: #f8fafc; font-weight: 600; color: var(--ink); }

.tone-list { display: flex; flex-direction: column; gap: 8px; }
.tone-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff; }
.tone-item.is-danger { border-color: #fecaca; background: var(--bad-soft); }
.tone-item.is-warn { border-color: #fde68a; background: var(--warn-soft); }
.tone-item .t { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.tone-item .s { font-size: 11.5px; color: var(--ink-3); }
.tone-item .go { margin-left: auto; font-size: 12px; white-space: nowrap; }

.section-split { height: 1px; background: var(--line-2); margin: 18px 0; }

/* ---------------- 响应式 ---------------- */
.sidebar-backdrop { display: none; }
@media (max-width: 1180px) {
    .kanban { grid-template-columns: repeat(9, minmax(168px, 1fr)); }
}
@media (max-width: 1024px) {
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
    .sidebar.is-open { transform: none; }
    .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 35; }
    .menu-toggle { display: grid !important; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-mobile-brand { display: flex; }
    .grid-2, .grid-3, .form-grid, .form-grid.is-3 { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .content { padding: 14px; }
}
.menu-toggle { display: none; }
@media (max-width: 640px) {
    .topbar { padding: 0 12px; }
    .user-chip .who { display: none; }
    .page-head-actions { width: 100%; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .field dt { flex: 0 0 88px; }
}

/* =========================================================
 * 易用性底座（复用自 daili-jiushui / qifu-jianzhu 的 ui 约定）
 *   · 页面说明抽屉 help_drawer
 *   · 面包屑 crumbs / 返回按钮
 *   · 统一筛选栏 filter_bar
 *   · 批量操作条 bulk_toolbar
 *   · 导入面板 import_panel
 *   · 状态时间线 audit_trail
 * ========================================================= */

/* ---------- 面包屑 ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }
.crumbs .crumb-sep { color: var(--ink-4); }
.crumbs .crumb-current { color: var(--ink); font-weight: 500; }

/* ---------- 页面说明抽屉 ---------- */
.help-btn { display: inline-flex; align-items: center; gap: 5px; }
.help-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .32); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 60; }
.help-mask.is-open { opacity: 1; pointer-events: auto; }
.help-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
    background: var(--card); border-left: 1px solid var(--line); z-index: 61;
    transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column;
}
.help-drawer.is-open { transform: translateX(0); }
.help-drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.help-drawer-head h3 { font-size: 14.5px; }
.help-drawer-head .help-close { margin-left: auto; }
.help-drawer-body { padding: 16px; overflow-y: auto; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.help-drawer-body h4 { font-size: 13px; color: var(--ink); margin: 14px 0 4px; }
.help-drawer-body h4:first-child { margin-top: 0; }
.help-drawer-body p { margin-bottom: 8px; }
.help-drawer-body ul { margin: 4px 0 10px; padding-left: 18px; list-style: disc; }
.help-drawer-body li { margin-bottom: 3px; }
.help-drawer-foot { padding: 12px 16px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; }
.help-drawer-foot a { font-size: 12.5px; }

/* ---------- 统一筛选栏 ---------- */
.filter-bar {
    display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fcfdfe;
}
.filter-bar .filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-bar .filter-field > label { font-size: 11.5px; color: var(--ink-4); }
.filter-bar .filter-field input, .filter-bar .filter-field select { min-width: 140px; }
.filter-bar .filter-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 0; }
.filter-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.filter-chip a { color: inherit; opacity: .7; }
.filter-chip a:hover { opacity: 1; }

/* ---------- 批量操作条 ---------- */
.bulk-bar {
    display: none; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 16px; background: var(--brand-soft); border-bottom: 1px solid #c7f0e4;
    font-size: 12.5px; color: var(--brand-dark);
}
.bulk-bar.is-active { display: flex; }
.bulk-bar .bulk-count { font-weight: 600; }
.bulk-bar .bulk-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bulk-check { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
th .bulk-check { margin: 0; }

/* ---------- 导入面板 ---------- */
.import-panel { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: #fcfdfe; }
.import-panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-panel-head strong { font-size: 13px; }
.import-panel-head .import-hint { font-size: 12px; color: var(--ink-3); }
.import-panel-body { margin-top: 12px; display: grid; gap: 10px; }
.import-panel-body .import-preview { font-size: 12px; color: var(--ink-3); max-height: 240px; overflow: auto; }

/* ---------- 状态时间线 ---------- */
.audit-trail { list-style: none; margin: 0; padding: 0; }
.audit-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.audit-item:last-child { border-bottom: none; padding-bottom: 0; }
.audit-dot { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--info); }
.audit-dot.is-ok { background: var(--ok); }
.audit-dot.is-bad { background: var(--bad); }
.audit-dot.is-info { background: var(--info); }
.audit-main { flex: 1; min-width: 0; }
.audit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.audit-transition { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.audit-arrow { color: var(--ink-4); }
.audit-doc { font-size: 12px; color: var(--brand-dark); }
.audit-doc:hover { text-decoration: underline; }
.audit-reason { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.7; }
.audit-meta { font-size: 11.5px; color: var(--ink-4); margin-top: 4px; }

/* ---------- 待办中心 ---------- */
.todo-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.todo-kpi { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.todo-row-overdue { background: var(--bad-soft); }
.todo-row-near { background: var(--warn-soft); }
