/* 审批第七版第一批「填写类」（决定 W-APPROVALS-V7-FILL-20260927）：各单子的填写页、核对页、离开存草稿、病假先休补证明。
   版式沿用请假页 02-03 的 lv-*（白卡片、灰色小标题、粗体数值、红色只给主按钮）；这里只加请假页没有的几样：
   行内输入、多选一可换行、附件（一行一个／缩略图）、核对页「谁来批」一关一行、草稿、病假那一块、详情里的把关和报价。 */

/* 行内输入：标签在左、值在右（和请假页的一格一行一样），输入框本身不画框 */
.lv-row--input { cursor: text; }
.af-input-val { align-items: center; min-width: 0; }
.af-input-val input { width: min(100%, 15em); min-width: 5em; padding: 6px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 750; text-align: end; outline: none; }
.af-input-val input[type="number"] { width: 7em; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.af-input-val input::-webkit-outer-spin-button, .af-input-val input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.af-input-val input::placeholder { color: #9a9ca3; font-weight: 600; }
.af-input-val input[aria-invalid="true"] { color: var(--danger); }
.lv-row--input:has(input[aria-invalid="true"]) .lv-label { color: var(--danger); }
.af-unit { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.af-placeholder { color: #9a9ca3; font-weight: 650; }
.lv-row--pick[aria-invalid="true"] .lv-label, .lv-row--pick[aria-invalid="true"] .af-placeholder { color: var(--danger); }
.lv-val small { margin-inline-start: 2px; }
.lv-row--toggle { cursor: pointer; }
.af-switch { justify-self: end; width: 44px; height: 26px; margin: 0; accent-color: var(--red); cursor: pointer; }

/* 多选一：四个字长的（阿语、英语）一行放不下就换行，靠右 */
.af-seg { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.af-seg button { white-space: normal; text-align: center; }
.af-seg:has(button[aria-invalid="true"]) { box-shadow: 0 0 0 2px var(--danger); }
.lv-row--control + .lv-sub, .lv-row + .lv-sub { margin-top: -6px; }

/* 系统算出（加班）、预算合计（出差） */
.af-calc .lv-row { min-height: 48px; }
.af-cat { color: var(--ink); font-size: 15px; font-weight: 750; }
.af-rates { margin-top: 2px; }
.af-total .lv-val b { font-size: 17px; }
.af-warn { color: var(--danger); font-weight: 700; }
.af-urgent { color: var(--danger); font-weight: 800; }
/* 说明、原因这类大框：第七版认可图里是卡片里一个浅灰细框（请假页同一个样子） */
.lv-card--text textarea { box-sizing: border-box; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.lv-card--text textarea:focus { border-color: #c9ccd2; }
.lv-card--text textarea[aria-invalid="true"] { border-color: var(--danger); }
.lv-card--text textarea.is-tall { min-height: 150px; }
.af-card-hint { margin: 8px 0 0; }

/* 附件：一行一个文件（图标、名字、大小、移除）＋虚线「加附件」；照片是缩略图＋虚线「＋」 */
.af-file-list { display: grid; gap: 8px; margin-top: 4px; }
.af-file-list:empty { display: none; }
.af-file { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.af-file-icon { display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 9px; background: #5d6470; color: #fff; font-size: 11px; font-weight: 800; }
.af-file-icon.is-pdf { background: #d92d20; }
.af-file-icon.is-xls, .af-file-icon.is-xlsx { background: #3f6b52; }
.af-file-icon img { width: 100%; height: 100%; object-fit: cover; }
.af-file-name { display: grid; min-width: 0; }
.af-file-name b { overflow: hidden; font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.af-file-name small { color: var(--muted); font-size: 12px; }
.af-add-file { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 10px; border: 1.5px dashed #c9ccd2; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.af-add-file[aria-invalid="true"], .af-photo-add[aria-invalid="true"] { border-color: var(--danger); color: var(--danger); }
.af-photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.af-photo, .af-photo-add { position: relative; width: 76px; height: 76px; flex: none; border-radius: 12px; }
.af-photo img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.af-photo-blank { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 12px; background: #eceef1; color: var(--muted); font-size: 12px; font-weight: 800; }
.af-photo-remove { position: absolute; top: -6px; inset-inline-end: -6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(20,20,24,.75); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.af-photo-add { border: 1.5px dashed #c9ccd2; background: transparent; color: #8a8d94; font-size: 26px; font-weight: 300; cursor: pointer; }

/* 核对页「谁来批」：一关一行，头像＋名字岗位，下面合并了哪几关、为什么交到这里、把关什么（第 19、20 条认可图） */
.af-chain { display: grid; gap: 0; margin: 0; padding: 4px 0; list-style: none; }
.af-step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
.af-step + .af-step::before { content: ''; position: absolute; top: -12px; inset-inline-start: 16px; height: 20px; border-inline-start: 1px dashed #c9ccd2; }
.af-avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #f4f5f7; color: #5d6470; font-size: 12px; font-weight: 800; }
.af-avatar.is-plus { border-style: dashed; background: transparent; color: #8a8d94; font-weight: 400; }
.af-step-body { display: grid; gap: 3px; min-width: 0; font-size: 14.5px; }
.af-step-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; overflow-wrap: anywhere; }
.af-step-who b { font-weight: 750; }
.af-step-who small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.af-step-body p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.af-chain-note { margin: 0 0 10px; }

/* 离开时「存为草稿？」（底部弹出，第 18 条认可图） */
.modal--draft-ask .af-draft-body { margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: #f4f5f7; color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.modal--draft-ask .modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal--draft-ask .modal-actions > * { min-height: 48px; }

/* 我发起的 · 草稿：一行一份，右下「删除｜继续填」 */
.apv-draft-row { cursor: default; }
.apv-draft-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 4px; }
.apv-draft-actions { display: inline-flex; gap: 8px; margin-inline-start: auto; }
.apv-draft-btn { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.apv-draft-btn.is-go { border-color: rgba(230,0,18,.45); color: var(--red); }

/* 病假先休、回来 3 天内选一个（第 36 条认可图） */
.af-sick { display: grid; gap: 10px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.af-sick header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.af-sick header b { font-size: 16px; font-weight: 800; }
.af-due { color: var(--danger); font-size: 13px; font-weight: 750; white-space: nowrap; }
.af-sick-sub, .af-sick-hint, .af-sick-returned { margin: -4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.af-sick-returned { color: var(--danger); font-weight: 650; }
.af-sick-hint { color: var(--danger); }
.af-sick-btn { display: grid; justify-items: center; gap: 2px; width: 100%; min-height: 50px; padding: 8px 12px; }
.af-sick-btn b { font-weight: 750; }
.af-sick-btn small { color: var(--muted); font-size: 12px; font-weight: 600; }
.af-sick-btn:disabled { opacity: .5; cursor: not-allowed; }
.af-sick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.af-sick.is-quiet { padding: 10px 14px; background: #fafafb; }
.af-sick.is-quiet p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* 单子详情里第一批加的几样：每一关把关什么、通过后怎么算钱、离职的领用记录、处分已阅 */
.flow-step-gate { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.af-pay-line { display: flex; align-items: center; gap: 6px; flex-basis: 100%; margin: 0 0 4px; color: var(--ink); font-size: 13px; font-weight: 650; }
.af-pay-line svg { flex: none; color: var(--muted); }
.af-supplies { display: grid; gap: 6px; margin: 12px 0 0; }
.af-supplies h3 { margin: 0; font-size: 14px; font-weight: 750; }
.af-supplies-hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.af-supply { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.af-supply small { color: var(--muted); font-size: 12px; }
.af-ack { display: grid; gap: 8px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.af-ack h3 { margin: 0; font-size: 15px; }
.af-ack p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.af-ack textarea { width: 100%; min-height: 64px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.af-scope-options { display: grid; gap: 10px; }
.af-scope-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.af-scope-option:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.af-scope-option input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.af-scope-option b { font-size: 15px; }
.af-scope-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.af-scope-lead { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: #f4f5f7; font-weight: 650; line-height: 1.6; }
.af-quote-hint { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.apv-tag.af-urgent-tag { border-color: var(--danger); background: var(--danger); color: #fff; }

/* 特殊事件报备：「这件事涉及我的直属上级」、谁来批 */
.event-involves { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 14.5px; cursor: pointer; }
.event-involves input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.event-involves small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.event-route { margin: 4px 0 0; }

/* 考勤月历：病假还没补证明、出差（第 14、37 条） */
.att-sick-tag { display: inline-block; justify-self: start; align-self: start; width: fit-content; margin-bottom: 4px; padding: 1px 8px; border-radius: 6px; background: var(--red-soft); color: var(--danger); font-size: 12px; font-weight: 750; }
.att-sick-go { margin-inline-start: auto; min-height: 36px; padding: 0 14px; border: 1px solid rgba(230,0,18,.45); border-radius: 10px; background: #fff; color: var(--red); font: inherit; font-size: 14px; font-weight: 750; white-space: nowrap; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }

@media (min-width: 1024px) {
  /* 电脑右栏里的填写页：填满那一栏，底部按钮贴着这一栏的底 */
  .apv-split-pane .lv-page { width: 100%; }
}

/* 发起申请那张表（人事单、付款、报销）、申请补卡、外勤申请的核对视图（第 19 条）：在原来那个弹窗／右栏里换掉填写区 */
.approval-create-form > .af-review-panel { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 14px 16px 0; }
.af-review-panel .lv-card { background: #fff; }
.af-review-summary { padding-block: 10px; }
/* 这一排和发起申请那张表的底栏同一个 .modal-actions--sticky：打字时照「打字时收底栏」名单收起 */
.af-review-panel .modal-actions--sticky.af-review-actions { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px -16px 0; padding: 11px 16px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line); background: #fff; }
.af-review-panel .af-review-actions > * { min-height: 48px; }
.modal:not(.modal--approval-create) > .af-review-panel { display: grid; gap: 12px; }
.modal:not(.modal--approval-create) > .af-review-panel .af-review-actions { margin-inline: 0; padding-inline: 0; }
@media (min-width: 1024px) {
  .approval-create-form--inline > .af-review-panel { overflow: visible; padding: 14px 0 0; }
  .approval-create-form--inline > .af-review-panel .af-review-actions { margin: 4px -20px -18px; padding: 12px 20px; border-radius: 0 0 16px 16px; }
}
