:root {
    --blue: #1769e0;
    --blue-dark: #1256bd;
    --bg: #f2f5fa;
    --card: #ffffff;
    --line: #e3e9f2;
    --text: #22303f;
    --muted: #8a97ab;
    --green: #1a9e5c;
    --red: #d9534f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
}
.boot { text-align: center; padding: 80px 0; color: var(--muted); }

.topbar {
    background: var(--blue);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar .brand { font-size: 18px; font-weight: 600; }
.topbar .user-info { font-size: 13px; display: flex; align-items: center; gap: 12px; }
.topbar .role-badge {
    background: rgba(255,255,255,.22);
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 12px;
}
.topbar button {
    background: rgba(255,255,255,.18);
    border: none; color: #fff; border-radius: 6px;
    padding: 5px 12px; cursor: pointer; font-size: 13px;
}
.navbar { display: flex; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.navbar .tab {
    flex: 1 0 auto; text-align: center; padding: 13px 10px; cursor: pointer;
    color: var(--muted); border-bottom: 2px solid transparent; font-size: 15px;
    white-space: nowrap;
}
.navbar .tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
/* 任务数量红点提示 */
.navbar .tab { position: relative; }
.navbar .tab-badge {
    display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
    padding: 0 5px; margin-left: 4px; border-radius: 9px;
    background: #e5484d; color: #fff; font-size: 11px; font-weight: 700;
    text-align: center; vertical-align: 2px;
    box-shadow: 0 1px 3px rgba(229,72,77,.35);
}

.wrap { max-width: 720px; margin: 0 auto; padding: 16px 14px 60px; }
.card {
    background: var(--card); border-radius: 12px; padding: 18px 16px;
    margin-bottom: 14px; box-shadow: 0 1px 3px rgba(30,50,90,.06);
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.card-title .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }

.field { margin-bottom: 14px; }
.field-label { font-size: 13px; color: #55617a; margin-bottom: 6px; }
.field-label .unit { color: var(--muted); font-size: 12px; }
.field-input, .field-select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 8px; font-size: 15px; background: #fbfcfe; outline: none;
}
.field-input:focus, .field-select:focus { border-color: var(--blue); }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.btn {
    display: inline-block; border: none; border-radius: 8px; cursor: pointer;
    font-size: 15px; padding: 11px 18px; width: 100%; text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:disabled { background: #a9c4ec; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-ghost { background: #eef2f8; color: #55617a; }
/* 退回发起人：红色醒目，与核定通过形成对比 */
.btn-return { background: #fdecec; color: #d64545; font-weight: 600; border: 1px solid #f3c1c1; }
.btn-return:hover { background: #fbdddd; }
.btn + .btn { margin-top: 10px; }

.steps-bar { display: flex; align-items: center; margin-bottom: 14px; }
.step-chip {
    padding: 7px 14px; border-radius: 16px; background: #fff; color: var(--muted);
    font-size: 13px; border: 1px solid var(--line);
}
.step-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.step-chip.done { color: var(--green); border-color: var(--green); }
.step-arrow { margin: 0 6px; color: var(--muted); }

.tip { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
/* 备份提醒状态 */
.backup-status { font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 8px; margin-bottom: 10px; line-height: 1.5; }
.backup-status.ok { background: #e9f7ee; color: #1d7a3e; border: 1px solid #bfe6cd; }
.backup-status.warn { background: #fdf0f1; color: #c0282e; border: 1px solid #f5b0b3; }
.backup-banner { background: #fdf0f1; color: #c0282e; font-size: 14px; font-weight: 600;
    border: 1px solid #f5b0b3; line-height: 1.6; }
/* 绿色突出的提示条（结果跟踪说明等） */
.tip-hl { background: #e9f7ee; color: #1d7a3e; border: 1px solid #bfe6cd;
    padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.6;
    margin-bottom: 12px; }
/* 绿色主按钮（催办发起人） */
.btn-green { background: #2f9e5f; color: #fff; font-weight: 600; }
.btn-green:hover { background: #278a51; }
/* 列表行内的绿色强调文字（报价记录的审核意见） */
.quote-sub.hl-text { color: #1d7a3e; font-weight: 600; }
.error-text { color: var(--red); font-size: 13px; margin: 8px 0; }
.result-line {
    background: #eaf1fc; border-radius: 8px; padding: 10px 14px;
    font-size: 14px; color: #2a4a7a; margin-bottom: 12px;
    display: flex; justify-content: space-between;
}
.result-line b { font-size: 16px; }
/* 询价信息 / 备注：绿色突出，字号加大 */
.result-line.hl {
    background: #e9f7ee; border-left: 3px solid #2e9e5b;
    font-size: 16px; color: #1d7a3e; padding: 12px 14px;
    line-height: 1.5; word-break: break-all;
}
.result-line.hl span:first-child { font-weight: 700; flex-shrink: 0; margin-right: 10px; }
.result-line.hl span:last-child { font-weight: 600; text-align: right; }
/* 审核意见：多行回车分行、左对齐，方便逐行看清和复制 */
.result-line.review-line { align-items: flex-start; }
.result-line.review-line .review-text { text-align: left; white-space: normal; line-height: 1.7; }
.quote-sub.hl-text .review-inline { display: inline; }

.quote-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.quote-row:last-child { border-bottom: none; }
.quote-main { flex: 1; min-width: 0; }
.quote-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.quote-row .btn { width: auto; padding: 7px 14px; font-size: 13px; margin: 0 0 0 10px; }
/* 行内多按钮（去处理 + 删除） */
.row-actions { display: flex; align-items: center; margin-left: 10px; flex-shrink: 0; }
.row-actions .btn { margin: 0 0 0 8px; white-space: nowrap; }
.btn-danger-sm {
    background: #fdecec; color: #d5443f; border: none;
    padding: 7px 12px; font-size: 13px;
}
.btn-danger-sm:hover { background: #f9d6d6; }

/* 催办：审批人提醒发起人加急处理 */
.urge-alert {
    border: 1px solid #f0cfcf; background: #fdf4f4; border-radius: 10px;
    padding: 12px; margin: 4px 0 14px;
}
.urge-alert.urge-urgent { border-color: #e2a9a9; background: #fdecec; }
.urge-head { font-size: 14px; font-weight: 700; color: #c0392b; margin-bottom: 6px; }
.urge-body { font-size: 14px; line-height: 1.65; color: var(--text); word-break: break-word; }
.urge-meta { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.urge-alert .btn { width: auto; padding: 8px 14px; font-size: 14px; }
.urge-form { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.urge-acts { display: flex; gap: 10px; }
.urge-acts .btn { flex: 1; width: auto; margin: 0 !important; }

/* 附件：发起报价上传图片 / Word / PDF */
.attach-row {
    display: flex; align-items: center; gap: 8px; background: #f7f9fd;
    border: 1px solid var(--line); border-radius: 8px;
    padding: 8px 10px; margin-bottom: 6px; font-size: 13px;
}
.attach-name { flex: 1; word-break: break-all; color: var(--text); }
.attach-size { color: var(--muted); white-space: nowrap; }
.attach-btn { width: auto; padding: 5px 10px; font-size: 12px; margin: 0; white-space: nowrap; }
.attach-pick { position: relative; overflow: hidden; font-size: 14px; }
.attach-pick input { display: none; }
.attach-picks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.attach-picks .attach-pick { flex: 1; min-width: 150px; text-align: center; }
.attach-tip { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.attach-up { color: var(--blue); font-size: 12px; white-space: nowrap; }
.attach-ok { color: var(--green, #1a9e5c); font-size: 12px; white-space: nowrap; }
.attach-fail { color: var(--red); font-size: 12px; word-break: break-all; }
/* 图片附件页内全屏预览 */
.img-viewer { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.img-viewer img { max-width: 96%; max-height: 90%; object-fit: contain; border-radius: 4px; }
.img-viewer-tip { color: rgba(255,255,255,.75); font-size: 12px; margin-top: 10px; }
.attach-group { margin-bottom: 8px; }
.attach-group-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 8px 0 6px; }
/* 回复式附件布局：发起人主块 + 审批人缩进回复块 */
.attach-block { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; margin-bottom: 8px; }
.attach-block-owner { background: #f7f9fd; }
.attach-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.attach-role { font-size: 12px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.attach-role-owner { background: #eaf1fc; color: var(--blue); }
.attach-role-reviewer { background: #e1f5ee; color: #0f6e56; }
.attach-role-boss { background: #faeeda; color: #854f0b; }
.attach-person { font-size: 13px; font-weight: 600; color: var(--text); }
.attach-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.attach-reply { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.attach-thread { margin-left: 22px; border-left: 2px solid #b5d4f4; padding-left: 14px; margin-top: 2px; }
.attach-row-fail { background: #fdf1f1; border-color: #f0cfcf; }
.attach-disabled { opacity: .6; pointer-events: none; }
/* 产品类型 / 报价方式选择 chips */
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chip {
    background: #eef2f8; color: #55617a; border: 1px solid transparent;
    padding: 7px 14px; border-radius: 16px; cursor: pointer; font-size: 13px;
}
.type-chip.active { background: #eaf1fc; color: var(--blue); border-color: var(--blue); font-weight: 600; }
.badge {
    display: inline-block; font-size: 12px; border-radius: 9px; padding: 1px 9px; margin-right: 6px;
}
.badge-blue { background: #eaf1fc; color: var(--blue); }
.badge-green { background: #e8f7ef; color: var(--green); }
.badge-gray { background: #eef1f5; color: var(--muted); }
.badge-amber { background: #fff4e3; color: #b8730f; }
.badge-red { background: #fdecec; color: var(--red); }
.badge-purple { background: #f1ecfd; color: #6b46c1; }
.badge-teal { background: #e5f6f5; color: #0f8a82; }

/* 结果跟踪 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-card { background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; }
.stat-card .stat-label { font-size: 12px; color: var(--muted); }
.stat-card .stat-value { font-size: 17px; font-weight: 700; margin-top: 4px; color: var(--text); }
textarea.field-input { resize: vertical; font-family: inherit; line-height: 1.6; }
@media (max-width: 420px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.hero-card { background: linear-gradient(135deg, #1769e0, #2f8bee); border-radius: 12px; color: #fff; padding: 22px 18px; margin-bottom: 14px; }
.hero-approved { font-size: 13px; opacity: .85; letter-spacing: 2px; }
.hero-spec { font-size: 15px; margin-top: 8px; word-break: break-all; }
.hero-total { margin-top: 12px; font-size: 26px; font-weight: 700; }
.hero-total small { font-size: 13px; font-weight: 400; opacity: .85; }

.login-card { max-width: 380px; margin: 60px auto 0; }
.login-card .card-title.login-title { text-align: center; }
.login-tabs { display: flex; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.login-tabs .lt { flex: 1; text-align: center; padding: 10px 0; cursor: pointer; color: var(--muted); }
.login-tabs .lt.active { color: var(--blue); border-bottom: 2px solid var(--blue); font-weight: 600; }
.brand-big { text-align: center; font-size: 22px; font-weight: 700; color: var(--blue); margin: 40px 0 6px; }
.brand-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.toast {
    position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%);
    background: rgba(30,40,55,.92); color: #fff; border-radius: 8px;
    padding: 10px 18px; font-size: 14px; z-index: 99; max-width: 86vw;
}
.empty-tip { text-align: center; color: var(--muted); font-size: 14px; padding: 30px 0; }
.mono { font-family: Consolas, monospace; }

/* 人员名单 */
.member-list { margin-top: 14px; border-top: 1px solid var(--line); }
.member-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.member-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.member-info { display: flex; flex-direction: column; gap: 2px; }
.member-role { font-size: 12px; color: #888; }
.member-on { font-size: 12px; font-weight: 400; color: var(--green); }
.member-off { font-size: 12px; font-weight: 400; color: var(--red); }
.member-bound { font-size: 12px; font-weight: 400; color: var(--blue); background: #eef4ff; border-radius: 4px; padding: 1px 6px; }
.member-unbound { font-size: 12px; font-weight: 400; color: #888; background: #f4f4f4; border-radius: 4px; padding: 1px 6px; }
.member-ops { display: flex; align-items: center; gap: 6px; }
.role-select {
    border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px;
    font-size: 13px; color: var(--text); background: #fff;
}
.btn-mini {
    border: 1px solid var(--line); background: #fff; color: var(--text);
    border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.btn-mini:hover { border-color: var(--blue); color: var(--blue); }
.btn-mini.danger { color: var(--red); border-color: #f3d2d1; }
.btn-mini.danger:hover { background: #fdf2f2; }

/* 线段价格查询结果 */
.seg-result {
    background: #eaf1fc; border-radius: 8px; padding: 12px 14px;
    font-size: 15px; font-weight: 600; color: #2a4a7a; margin-bottom: 12px;
    word-break: break-all;
}
.seg-result::first-line { font-weight: 600; }
.ver-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 10px;
    background: #eef1f5; color: var(--muted); font-size: 11px; font-weight: 500; vertical-align: 2px; }
.brand-sub .ver-badge { margin-left: 4px; vertical-align: 0; }
.lan-badge { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 10px;
    background: #f97316; color: #fff; font-size: 12px; font-weight: 600; vertical-align: 2px; letter-spacing: .5px; }
.brand-big .lan-badge { font-size: 13px; vertical-align: 5px; margin-left: 10px; }

/* —— 报价记录页：就地客户反馈跟踪 —— */
.rec-row { flex-wrap: wrap; }
.rec-row.fb-open { background: #f7fafd; border-radius: 8px; padding-bottom: 4px; }
.rec-right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; margin-left: 10px; gap: 6px; }
.rec-price { font-weight: 700; color: var(--blue); white-space: nowrap; font-size: 14px; }
.quote-sub.fb-brief { color: #1d7a3e; font-weight: 600; }
.rec-fb-form {
    width: 100%; flex-basis: 100%; margin-top: 10px; padding: 14px 16px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: inset 0 0 0 1px #f0f3f7;
}
.rec-fb-form .field { margin-bottom: 10px; }
.rec-fb-acts { display: flex; gap: 10px; margin-top: 6px; }
.rec-fb-acts .btn { margin: 0; }

/* —— 结果跟踪页：日期阶段筛选 + 图形分析导出 —— */
.res-filter-bar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
    margin: 6px 0 4px; padding: 12px 14px; background: #f7fafd;
    border: 1px solid var(--line); border-radius: 10px;
}
.res-filter-bar .field { margin: 0; min-width: 150px; }
.res-filter-bar .btn { margin: 0; white-space: nowrap; }
