/* 审批第七版第三批「办完以后」（决定 W-APPROVALS-V7-AFTER-20260927）：打印 / 存 PDF、分享给同事或群、抄送的人和不相关的人、
   事前申请批完的下一步、付款带内容、备用金领花核销、申请撤销。版式沿用第一、二批的 lv-*／ad-*（白卡片、灰色小标题、红色只给主按钮）。 */

/* ── 流程最后一行「抄送：……」（第 41 条图） ── */
.ad-flow-tail { margin: 2px 0 0 46px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
[dir="rtl"] .ad-flow-tail { margin: 2px 46px 0 0; }

/* ── 不相关的人打开（第 41 条图）：锁、看不到、为什么、找谁 ── */
.ap-noaccess { display: grid; justify-items: center; gap: 6px; padding: 48px 20px; text-align: center; }
.ap-noaccess h2 { margin: 6px 0 2px; color: var(--ink); font-size: 17px; font-weight: 800; }
.ap-noaccess p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.ap-lock { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #f1f2f4; color: #5d6470; }
.ap-lock svg { width: 26px; height: 26px; }
.ap-noaccess-back { display: inline-flex; align-items: center; min-height: 38px; margin-top: 12px; padding: 0 16px; color: var(--ink); text-decoration: none; }

/* ── 第 39 条：打印 / 存 PDF ── */
.ap-print-page { display: grid; gap: 12px; padding-bottom: 110px; }
.ap-print-h { margin: 2px 2px 0; color: var(--ink); font-size: 20px; font-weight: 800; }
.ap-print-sheet { padding: 12px; border-radius: 16px; background: #e9eaee; }
.ap-doc { display: grid; gap: 10px; padding: 20px 18px 16px; background: #fff; color: #1d1f24; font-size: 11.5px; line-height: 1.5; box-shadow: 0 2px 10px rgba(17, 24, 39, .1); }
.ap-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ap-doc-head h1 { margin: 0; font-size: 17px; font-weight: 800; }
.ap-doc-head p { margin: 2px 0 0; color: #6b6e75; font-size: 11px; }
.ap-doc-title { margin: 0; font-size: 13.5px; font-weight: 750; }
.ap-stamp { flex: none; padding: 2px 10px; border: 1.5px solid #3a3d44; border-radius: 6px; color: #3a3d44; font-size: 12px; font-weight: 800; transform: rotate(-4deg); }
.ap-stamp.is-approved { border-color: #2f7d4a; color: #2f7d4a; }
.ap-stamp.is-rejected, .ap-stamp.is-returned { border-color: #c4001a; color: #c4001a; }
.ap-stamp.is-cancelled { border-color: #8a8d94; color: #8a8d94; }
.ap-doc h3 { margin: 6px 0 0; font-size: 12px; font-weight: 800; }
.ap-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ap-table th, .ap-table td { padding: 5px 7px; border: 1px solid #cfd2d8; text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.ap-table th { background: #f3f4f6; font-weight: 750; }
.ap-info th { width: 24%; }
.ap-records th:nth-child(1), .ap-records td:nth-child(1) { width: 26%; }
.ap-records th:nth-child(2), .ap-records td:nth-child(2) { width: 22%; }
.ap-records th:nth-child(3), .ap-records td:nth-child(3) { width: 17%; }
.ap-comments td:nth-child(1) { width: 26%; }
.ap-comments td:nth-child(3) { width: 17%; }
.ap-doc-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e3e4e8; color: #6b6e75; font-size: 10.5px; }
#ap-print-root { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm 16mm; }
  body.ap-printing > *:not(#ap-print-root):not(#miniso-watermark-overlay) { display: none !important; }
  body.ap-printing #ap-print-root { display: block; }
  body.ap-printing .ap-doc { padding: 0; box-shadow: none; font-size: 10.5pt; }
  body.ap-printing .ap-doc-foot { position: fixed; bottom: 0; inset-inline: 0; border-top: 0; }
  body.ap-printing .ap-table tr { break-inside: avoid; }
}

/* ── 第 40 条：分享给同事或群 ── */
.ap-share-list { max-height: 34vh; }
.ad-avatar.is-group { border-radius: 10px; }

/* ── 第 38、42–44 条：单子头下面的状态卡片（已领取备用金、已付多少还剩多少、额度用完了、撤销在批、已取消……） ── */
.ap-statuses { display: grid; gap: 10px; }
.ap-status { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; }
a.ap-status { grid-template-columns: minmax(0, 1fr) auto; }
a.ap-status > b, a.ap-status > span { grid-column: 1; }
a.ap-status > i { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--muted); font-style: normal; font-size: 18px; }
.ap-status > b { font-size: 15px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.ap-status > span { color: var(--muted); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ap-status.is-run { border-color: #f1d9a8; background: #fffaf0; }
.ap-status.is-gray { background: #fafafb; }
.ap-status-link { color: var(--muted); text-decoration: none; }
.ap-status-link::after { content: ' ›'; }
[dir="rtl"] .ap-status-link::after { content: ' ‹'; }

/* ── 第 43、44 条：付款、报销、核销、撤销单子顶上那张原单小卡片 ── */
.ap-source { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; }
.ap-source-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #f1f2f4; color: #5d6470; }
.ap-source-icon svg { width: 22px; height: 22px; }
.ap-source-body { display: grid; gap: 2px; min-width: 0; }
.ap-source-body b { font-size: 14.5px; font-weight: 800; overflow-wrap: anywhere; }
.ap-source-body small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.ap-source > i { color: var(--muted); font-style: normal; font-size: 18px; }

/* ── 第 38 条：申请撤销弹层、撤销单上的打卡记录 ── */
.ap-revoke-lead { display: grid; gap: 4px; }
.ap-revoke-lead p { margin: 0; }
.ap-choice-row { grid-template-columns: 1fr 1fr; }
.ap-punches { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ap-punches li { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-punches b { font-weight: 750; }
.ap-punches span { color: var(--muted); }
.ap-punch-none { margin: 0; color: var(--muted); font-size: 13px; }

/* 「金额 3,500 EGP　追加」：原单下面「追加」（细节「追加」） */
.ap-append-link { margin-inline-start: 10px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }

/* 内容卡里一格的第二行小字（付款方式下面「批完在单子上点『发起付款』」、事前申请下面「9月23日批完，5 个人都同意了」） */
.ad-rows dd small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.5; }

/* 流程里「发起付款 2609-0071 · 1,200 EGP」、内容卡里「事前申请」那一格：点得开（看那张单），样子跟正文一样，后面一个 › */
.ad-line a, .ad-rows dd > a[href^="#/approval/"] { color: inherit; text-decoration: none; }
.ad-line a::after, .ad-rows dd > a[href^="#/approval/"]::after { content: ' ›'; color: var(--muted); }
[dir="rtl"] .ad-line a::after, [dir="rtl"] .ad-rows dd > a[href^="#/approval/"]::after { content: ' ‹'; }
