/* ChapsV_AppSFA_DAF.css — Deal Approval Form styles */

.daf-page { max-width: 900px; margin: 16px auto; padding: 0 12px; font-family: OpenSans, sans-serif; font-size: inherit; }
.daf-layout { display: flex; gap: 12px; align-items: flex-start; }
.daf-form-col { flex: 1; min-width: 0; }
.daf-summary-col { width: 220px; flex-shrink: 0; position: sticky; top: 12px; }

/* overflow:visible (not hidden) is intentional — the admin "Reviewing as ▾"
   <select> popup must escape the card's bounds; overflow:hidden was clipping
   the option list behind the comment textarea. The rounded-top-corner clip
   that overflow:hidden previously provided is restored via border-radius
   on .daf-card-header below. */
.daf-card { background: #fff; border: 1px solid #dde1e7; border-radius: 4px; margin-bottom: 10px; overflow: visible; }
.daf-card.hidden { display: none; }

.daf-card-header { padding: 8px 14px; background: #f7f8fa; border-bottom: 1px solid #dde1e7; font-size: 12px; font-weight: 600; color: #444; display: flex; align-items: center; gap: 8px; border-radius: 4px 4px 0 0; }
.daf-section-badge { font-size: 10px; font-weight: 700; color: #666; background: #e4e6ea; border-radius: 3px; padding: 1px 6px; }

.daf-skip-notice { display: none; padding: 7px 14px; background: #fafafa; border-bottom: 1px solid #eee; font-size: 12px; color: #999; align-items: center; gap: 6px; }
.daf-skip-notice.visible { display: flex; }
/* "Not required" outcome message at the bottom of the S1 card (Q01 paths 3/4).
   Padding restated: the standalone .daf-notrequired rule (banner era) comes later
   in this file and would otherwise zero the horizontal padding. */
.daf-skip-notice.daf-notrequired { border-bottom: none; border-top: 1px solid #eee; padding: 8px 14px; }
.daf-pricing-strip.hidden { display: none; }

/* ─── APPR-01: "Possible Approvers" popup (Required Approvals sidebar) ─── */
.daf-approvers-btn { display: block; width: 100%; margin-top: 10px; }
.daf-apprv-note { font-size: 11px; color: #888; font-style: italic; margin-bottom: 10px; }
.daf-apprv-group { padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.daf-apprv-group:last-child { border-bottom: none; }
.daf-apprv-role { font-size: 12px; font-weight: 600; color: #444; margin-bottom: 5px; }
.daf-apprv-count { display: inline-block; font-size: 10px; font-weight: 700; color: #666; background: #e4e6ea; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.daf-apprv-users { display: flex; gap: 4px; flex-wrap: wrap; }
.daf-apprv-none { font-size: 11px; color: #c0392b; font-style: italic; }

/* Question rows: label takes majority width (minmax(0,1fr) — the min:0 keeps
   long labels from forcing horizontal overflow); control column is a fixed
   180px — enough room for the widest path-style buttons ("Yes — with deliverables",
   "No — T&M only") at ~165px combined, with a small breathing margin.
   The dependent strips (.daf-appr-strip, .daf-detail-strip, .daf-subq-block)
   keep their 224px left indent as a visual relation marker; they intentionally
   sit inside the label column now rather than aligned to the control column. */
.daf-field-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: start; padding: 6px 14px; border-bottom: 1px solid #f2f3f5; min-height: 34px; }
.daf-field-row:last-child { border-bottom: none; }
.daf-field-row.hidden { display: none; }
/* Reviewer-filtered hide: non-admin DAF role holders see only their questions.
   !important beats .visible / display:grid / display:block on all element types. */
.daf-reviewer-hidden { display: none !important; }

.daf-field-label { font-size: 12px; color: #555; padding-top: 4px; padding-right: 10px; line-height: 1.45; }
.daf-fid { display: inline-block; font-size: 10px; font-weight: 700; color: #1a73e8; background: #e8f0fe; border-radius: 3px; padding: 1px 5px; margin-right: 4px; letter-spacing: 0.1px; }
.daf-info-icon { display: inline-block; font-size: 10px; color: #aaa; cursor: pointer; margin-left: 3px; vertical-align: middle; }
.daf-info-icon:hover { color: #1a73e8; }

.daf-field-control { padding-top: 2px; }

.daf-yn-group { display: flex; gap: 5px; flex-wrap: wrap; }
.daf-yn-btn { display: inline-flex; align-items: center; padding: 3px 12px; border: 1px solid #c8cdd5; border-radius: 3px; font-size: 12px; color: #444; background: #fff; cursor: pointer; transition: all 0.1s; user-select: none; font-family: inherit; white-space: nowrap; }
.daf-yn-btn:hover { border-color: #1a73e8; color: #1a73e8; }
.daf-yn-btn.sel-yes { background: #fff3e0; border-color: #e67700; color: #b85c00; font-weight: 500; }
.daf-yn-btn.sel-no  { background: #e8f5e9; border-color: #2e7d32; color: #256427; font-weight: 500; }
.daf-yn-btn.sel-path { background: #e8f0fe; border-color: #1a73e8; color: #1558b0; font-weight: 500; }
.daf-yn-btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.daf-appr-strip { display: none; padding: 5px 14px 6px 224px; background: #fffbf0; border-bottom: 1px solid #fde8c0; }
.daf-appr-strip.visible { display: block; }
.daf-appr-title { font-size: 10px; font-weight: 700; color: #b85c00; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px; }
.daf-appr-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.daf-appr-pill { font-size: 11px; background: #fff; border: 1px solid #e0a060; color: #7a4000; border-radius: 3px; padding: 1px 7px; font-weight: 500; }
.daf-appr-note { font-size: 10px; color: #a07040; margin-top: 3px; }

.daf-detail-strip { display: none; padding: 0 14px 8px 224px; background: #fafbfc; border-bottom: 1px solid #f0f2f5; }
.daf-detail-strip.visible { display: block; }
/* box-sizing: border-box keeps `width: 100%` honest — without it the 5+8 padding
   and 1+1 border are added on top of 100%, which together with .daf-card's
   intentional `overflow: visible` (for the native <select> popup) caused the
   textarea to visibly bleed past the card's right edge. */
.daf-dtxt { width: 100%; max-width: 100%; box-sizing: border-box; border: 1px solid #c8cdd5; border-radius: 3px; padding: 5px 8px; font-size: 12px; font-family: inherit; color: #333; background: #fff; resize: vertical; min-height: 48px; outline: none; }
.daf-dtxt:focus { border-color: #1a73e8; }
.daf-dtxt::placeholder { color: #c0c4cc; }
.daf-dtxt:read-only { background: #f7f8fa; color: #888; cursor: default; }

.daf-path-strip { display: none; padding: 5px 14px; font-size: 11px; font-weight: 600; align-items: center; gap: 6px; border-bottom: 1px solid; }
.daf-path-strip.visible { display: flex; }
.daf-path-strip.d1 { background: #e8f0fe; color: #1a73e8; border-color: #c5d8fc; }
.daf-path-strip.d5 { background: #e8f5e9; color: #2e7d32; border-color: #b2dfdb; }

.daf-subq-block { display: none; padding: 8px 14px 10px 224px; background: #fafbfc; border-bottom: 1px solid #f0f2f5; }
.daf-subq-block.visible { display: block; }
.daf-subq-item { margin-bottom: 8px; }
.daf-subq-label { display: block; font-size: 11px; font-weight: 600; color: #555; margin-bottom: 3px; }
.daf-subq-id { color: #1a73e8; font-weight: 700; margin-right: 3px; }

.daf-action-bar { background: #fff; border: 1px solid #dde1e7; border-radius: 4px; padding: 9px 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
/* Action-bar buttons (Save Draft / Cancel) toggled by the revise-state machine.
   Used by _buildForm (initial submitted state), _lockForm and _unlockForm. */
.daf-action-bar button.hidden { display: none; }
/* Action buttons (Save Draft / Submit / View History / Cancel / Revise / Approve All)
   use the project-standard w2ui button classes (w2ui-btn / w2ui-btn-blue / w2ui-btn-green)
   — see ChapsV_AppBuilder.css for the shared sizing, font, and color treatment. No
   DAF-specific button styling here keeps them visually identical to the rest of the SPA. */
.daf-progress-text { font-size: 12px; color: #888; margin-left: auto; margin-right: 8px; }
.daf-status-msg { font-size: 12px; color: #2e7d32; font-weight: 500; }

/* ─── DAFSTATUS soft pill (action-bar + tab badge) ────────────────────────
   Single class-based style source shared by the in-form pill (action bar)
   and the tab badge (TabLabel). Soft pastel backgrounds + darker same-hue
   text + 1px same-hue border. Palette is Tailwind-inspired:
     pending/notstarted → slate-100 / slate-600 / slate-300
     inprogress         → amber-100 / amber-800 / amber-300
     approved           → green-100 / green-800 / green-300
     rejected           → red-100   / red-800   / red-300
*/
.daf-status-pill { display: inline-block; border-radius: 15px; padding: 2px 10px; font-size: 11px; font-weight: 600; border: 1px solid transparent; line-height: 1.5; }
.daf-status-pill.status-pending    { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.daf-status-pill.status-inprogress { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.daf-status-pill.status-approved   { background: #dcfce7; color: #166534; border-color: #86efac; }
.daf-status-pill.status-rejected   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* ─── DAF tab status dot ───────────────────────────────────────────────────
   Trailing dot on the DAF tab label (TabLabel). The label text itself is plain
   "DAF" (matches sibling tabs); this dot is the only status-colored element.
   Solid fills from the same status palette as the pills above. Shares the
   .status-* modifier classes via _statusClass. vertical-align:middle aligns the
   dot to the tab text midline; margin-left gives a small gap after "DAF". */
.daf-tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 5px; vertical-align: middle; background: #94a3b8; }
.daf-tab-dot.status-pending    { background: #94a3b8; }
.daf-tab-dot.status-inprogress { background: #f59e0b; }
.daf-tab-dot.status-approved   { background: #22c55e; }
.daf-tab-dot.status-rejected   { background: #ef4444; }

/* ─── Disabled w2ui buttons inside the DAF page ────────────────────────────
   The colored CTAs (Submit for Approval, Submit Review, Save Comment → w2ui-btn-blue;
   Approve All → w2ui-btn-green) declare their fill with !important in
   ChapsV_AppBuilder.css / w2ui.css, so a plain :disabled would still read as enabled.
   Scoping under .daf-page plus the extra class/pseudo gives higher specificity than the
   color rules (and !important), so disabled CTAs render unambiguously: gray fill, muted
   text, not-allowed cursor, no hover, full opacity (w2ui's default 0.5 opacity stacked
   with our gray looked washed out). */
.daf-page button.w2ui-btn:disabled,
.daf-page button.w2ui-btn[disabled] {
    background: #d0d6dd !important;
    color: #8a8f96 !important;
    border-color: #c0c6cd !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}
.daf-page button.w2ui-btn:disabled:hover,
.daf-page button.w2ui-btn[disabled]:hover {
    background: #d0d6dd !important;
    color: #8a8f96 !important;
    border-color: #c0c6cd !important;
}

/* ─── Compact sizing for DAF action buttons ───────────────────────────────
   The global button.w2ui-btn rule (ChapsV_AppBuilder.css) is the heavy dialog
   size: 32px tall, 14px font, 80px min-width. That's too big for the DAF page,
   which is a dense 12px form. These rules keep the w2ui identity (colors, radius,
   hover/active, disabled) but trim to a size that sits naturally next to the
   12px labels. Scoped to .daf-page with !important to beat the global rules
   (which load after this file — see index.html — and use !important). */
.daf-page button.w2ui-btn {
    height: 26px !important;
    line-height: 24px !important;
    min-width: 0 !important;
    padding: 0 12px !important;
    font-size: 12px !important;
}
/* Review-block buttons (Submit Review / Cancel / Edit Review) carry w2ui-btn-small,
   whose base rule forces square 5px padding — give them proper horizontal padding
   and a slightly smaller height to match the compact review block (font-size: 11px). */
.daf-page button.w2ui-btn.w2ui-btn-small {
    height: 23px !important;
    line-height: 21px !important;
    padding: 0 10px !important;
}

/* ─── Muted "link" buttons (Cancel) ───────────────────────────────────────
   Cancel is a discard/exit action — it should read as weaker than Save Draft
   (neutral gray) and the Submit CTA (blue). Borderless, no fill, gray text that
   darkens + underlines on hover. Keeps the w2ui-btn box (height/alignment) so it
   still lines up in the action bar. Specificity (0,3,1) + !important beats both the
   global button.w2ui-btn fill rules and the compact sizing rules above. Applies to
   the action-bar Cancel (#daf-cancel-…) and the review Edit-Cancel. */
.daf-page button.w2ui-btn.daf-btn-link {
    background: transparent !important;
    border-color: transparent !important;
    color: #888 !important;
    min-width: 0 !important;
    padding: 0 6px !important;
}
.daf-page button.w2ui-btn.daf-btn-link:hover {
    background: transparent !important;
    color: #555 !important;
    text-decoration: underline !important;
}
.daf-page button.w2ui-btn.daf-btn-link:active,
.daf-page button.w2ui-btn.daf-btn-link.clicked {
    background: transparent !important;
    transform: none !important;
}

.daf-review-block { background: #f7f8fa; border: 1px solid #dde1e7; border-radius: 3px; padding: 6px 10px; margin-top: 0; font-size: 11px; }
.daf-review-fid { display: inline-block; font-size: 10px; font-weight: 700; color: #555; background: #e6e9ee; border-radius: 3px; padding: 1px 5px; margin-right: 4px; letter-spacing: 0.1px; }
.daf-review-role { font-weight: 600; color: #555; }
.daf-review-status { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; margin-left: 6px; }
.daf-review-status.pending { background: #f0f0f0; color: #888; }
.daf-review-status.approved { background: #e8f5e9; color: #2e7d32; }
.daf-review-status.rejected { background: #fdecea; color: #c62828; }
.daf-review-comment { margin-top: 4px; color: #777; font-style: italic; }

.daf-summary-card { background: #fff; border: 1px solid #dde1e7; border-radius: 4px; overflow: hidden; }
.daf-summary-header { padding: 8px 12px; background: #f7f8fa; border-bottom: 1px solid #dde1e7; font-size: 11px; font-weight: 600; color: #444; }
.daf-summary-body { padding: 8px 10px; }
.daf-prog-wrap { background: #eaecef; border-radius: 2px; height: 3px; margin-bottom: 3px; overflow: hidden; }
.daf-prog-fill { height: 100%; background: #1a73e8; border-radius: 2px; transition: width 0.25s; width: 0%; }
.daf-prog-lbl { font-size: 10px; color: #aaa; margin-bottom: 8px; }
.daf-summ-empty { font-size: 12px; color: #bbb; }
.daf-summ-item { padding: 5px 8px; border-radius: 3px; margin-bottom: 5px; background: #fffbf0; border: 1px solid #f0d090; }
.daf-summ-name { font-size: 11px; font-weight: 600; color: #7a4000; }
.daf-summ-qs   { font-size: 10px; color: #a07040; margin-top: 1px; }

/* ─── Phase 4 review controls ─────────────────────────────────────────── */

/* Expanded review-block form (D-02) */
.daf-review-block.expanded { padding: 8px 12px; }
.daf-review-header { display: flex; align-items: center; gap: 8px; }

.daf-review-form { margin-top: 6px; }

/* Admin attribution dropdown row */
.daf-review-attribution { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; color: #555; }
.daf-review-attribution label { color: #888; }
.daf-review-attr-select { font-size: 11px; padding: 2px 6px; border: 1px solid #c8cdd5; border-radius: 3px; background: #fff; color: #333; min-width: 160px; font-family: inherit; }
.daf-review-attr-select:focus { outline: none; border-color: #1a73e8; }

/* Decision pills (Approve / Reject) */
.daf-review-controls { display: flex; gap: 6px; margin-bottom: 6px; }
.daf-review-decision-btn { display: inline-flex; align-items: center; padding: 3px 12px; border: 1px solid #c8cdd5; border-radius: 3px; font-size: 12px; color: #444; background: #fff; cursor: pointer; transition: all 0.1s; user-select: none; font-family: inherit; }

/* Color-coded by intent — green for approve, red for reject. Pale fill by
   default; deeper fill when selected via .sel-approve / .sel-reject. Reuses
   the approved/rejected palette already used by the status pills and revise
   annotations — no new color tokens introduced. */
.daf-review-decision-btn[data-decision="approved"] { background: #f0fdf4; border-color: #86efac; color: #166534; }
.daf-review-decision-btn[data-decision="approved"]:hover { border-color: #2e7d32; }
.daf-review-decision-btn[data-decision="rejected"] { background: #fff5f5; border-color: #fca5a5; color: #991b1b; }
.daf-review-decision-btn[data-decision="rejected"]:hover { border-color: #c62828; }

.daf-review-decision-btn.sel-approve { background: #e8f5e9; border-color: #2e7d32; color: #256427; font-weight: 500; }
.daf-review-decision-btn.sel-reject { background: #fdecea; border-color: #c62828; color: #b71c1c; font-weight: 500; }
.daf-review-decision-btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* Approve All bulk button uses w2ui-btn w2ui-btn-green (positive bulk action) —
   color/sizing come from the shared w2ui rules; the disabled state is handled by
   the .daf-page button.w2ui-btn:disabled rule above. No DAF-specific styling needed. */

/* Comment textarea — match .daf-dtxt style but slightly tighter padding.
   box-sizing: border-box prevents the 5+8 padding and 1+1 border from being
   added on top of width:100%, which (with .daf-card overflow:visible) caused
   the textarea to bleed past the card's right edge. */
.daf-review-cmt { width: 100%; max-width: 100%; box-sizing: border-box; border: 1px solid #c8cdd5; border-radius: 3px; padding: 5px 8px; font-size: 12px; font-family: inherit; color: #333; background: #fff; resize: vertical; min-height: 36px; outline: none; }
.daf-review-cmt:focus { border-color: #1a73e8; }
.daf-review-cmt::placeholder { color: #c0c4cc; }

/* Submit Review button row (with optional Cancel button on Edit Review path).
   The buttons themselves use w2ui-btn (w2ui-btn-blue + w2ui-btn-small) for project-
   consistent styling; .daf-review-submit-btn / .daf-review-cancel-btn remain only as
   JS event-handler hooks (no styling here). */
.daf-review-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }

/* Collapsed read-only summary (D-03) */
.daf-review-block.collapsed { background: #f7f8fa; padding: 6px 10px; }
.daf-review-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; }
.daf-review-by { color: #777; }
.daf-review-when { color: #aaa; font-size: 10px; }
/* Edit Review uses w2ui-btn w2ui-btn-small for styling; this rule only pushes it to
   the right edge of the flex summary row (layout-only, no visual styling). */
.daf-review-edit-btn { margin-left: auto; }

/* ── Global DAF Comment section ─────────────────────────────────────── */
.daf-global-comment {
    margin: 12px 0 8px;
    padding: 10px 12px;
    border: 1px solid #dde1e7;
    border-radius: 4px;
    background: #fafafa;
}
.daf-global-comment-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.daf-global-comment-txt {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #c8cdd5;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 12px;
    font-family: inherit;
    color: #333;
    background: #fff;
    outline: none;
    min-height: 54px;
}
.daf-global-comment-txt:focus { border-color: #1a73e8; }
.daf-global-comment-txt::placeholder { color: #c0c4cc; }
.daf-global-comment-txt[readonly] {
    background: #f7f8fa;
    color: #888;
    cursor: default;
}
.daf-global-comment-meta {
    font-size: 11px;
    color: #888;
    margin: 4px 0;
    min-height: 1em;
}
/* Save Comment uses w2ui-btn w2ui-btn-blue; the top gap comes from the meta line's
   margin above it. Disabled state handled by .daf-page button.w2ui-btn:disabled. */

/* ── History modal (Phase 6) ─────────────────────────────────────── */

/* Full-viewport overlay */
.daf-history-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    /* The overlay is appended to <body>, outside .daf-page, so it does NOT inherit
       the app font that .daf-page sets. Declare it here so the modal renders in the
       same OpenSans family (and a sane base size) as the rest of the DAF UI rather
       than the browser default serif. All modal text sizes are px-defined below. */
    font-family: OpenSans, sans-serif;
    font-size: 13px;
}

/* Modal box */
.daf-history-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    width: 780px;
    max-width: 96vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal header */
.daf-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e8e8e8;
    background: #f7f8fa;
    flex-shrink: 0;
}
.daf-history-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

/* Close button */
.daf-history-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 2px 6px;
    border-radius: 3px;
}
.daf-history-close:hover { background: #eee; color: #333; }

/* Scrollable body */
.daf-history-body {
    overflow-y: auto;
    padding: 16px 18px;
    flex: 1;
}

/* Loading/error state */
.daf-history-loading {
    color: #999;
    font-size: 13px;
    padding: 20px 0;
    text-align: center;
}

/* One card per submission version */
.daf-hist-version-card {
    border: 1px solid #e0e2e6;
    border-radius: 5px;
    margin-bottom: 16px;
    overflow: hidden;
}

/* Version card header */
.daf-hist-version-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f2f4f7;
    border-bottom: 1px solid #e0e2e6;
    font-size: 13px;
}
.daf-hist-version-badge {
    font-weight: 700;
    color: #3a5fa0;
    font-size: 13px;
    min-width: 60px;
}
.daf-hist-meta {
    color: #555;
    flex: 1;
}

/* Answers and reviews sections within a version card */
.daf-hist-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin: 10px 14px 4px;
}

/* Answer rows */
.daf-hist-answer-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 14px;
    font-size: 12px;
    border-top: 1px solid #f0f0f0;
}
.daf-hist-answer-row:first-child { border-top: none; }
.daf-hist-qcode {
    font-weight: 600;
    color: #3a5fa0;
    min-width: 52px;
    flex-shrink: 0;
}
.daf-hist-qlabel { color: #444; flex: 1; }
.daf-hist-avalue {
    font-weight: 600;
    color: #1a1a1a;
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}
.daf-hist-detail {
    font-size: 11px;
    color: #666;
    margin: 0 14px 4px 74px;
    font-style: italic;
}

/* Review rows */
.daf-hist-review-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 14px;
    font-size: 12px;
    border-top: 1px solid #f0f0f0;
}
.daf-hist-rev-qcode {
    font-weight: 600;
    color: #3a5fa0;
    min-width: 52px;
    flex-shrink: 0;
}
.daf-hist-rev-by { color: #444; flex: 1; }
.daf-hist-rev-date { color: #888; font-size: 11px; flex-shrink: 0; }
.daf-hist-rev-comment {
    font-size: 11px;
    color: #666;
    margin: 0 14px 4px 74px;
    font-style: italic;
}

/* "View History" button uses the standard w2ui-btn class (neutral action). */

/* ── Revise & Resubmit review annotations (read-only, shown while editing) ── */
.daf-revise-annotation {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    margin-top: 4px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid transparent;
}
.daf-revise-annotation.rejected {
    background: #fff5f5;
    border-color: #fca5a5;
    color: #991b1b;
}
.daf-revise-annotation.approved {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
    opacity: 0.75;
}
.daf-revise-annotation-label {
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.daf-revise-annotation-comment {
    font-style: italic;
    color: inherit;
    opacity: 0.85;
}

/* ─── DAF v2: composition banner + form gate ──────────────────────────── */
.daf-comp-body { padding: 10px 14px; }
.daf-comp-sentence { font-size: 12px; color: #444; margin-bottom: 8px; }
.daf-comp-confirm { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #333; font-weight: 500; cursor: pointer; }
.daf-comp-confirm input[type="checkbox"] { margin: 0; cursor: pointer; }
.daf-notrequired { font-size: 13px; font-weight: 600; color: #666; padding: 6px 0 2px; }
/* Everything below the banner is hidden until the rep confirms composition */
.daf-gate-wrap.collapsed { display: none; }

/* ─── DAF v4: question note — rendered on its own line under the label ── */
.daf-q-note { font-size: 11px; color: #888; font-style: italic; margin-top: 4px; line-height: 1.4; }
.daf-q-note a { color: #1a73e8; text-decoration: underline; }

/* ─── DAF v4: Q00 Deal Pricing Approval Matrix ────────────────────────────
   One .daf-pricing-slot per required approval; ANY role within a slot may
   approve, ALL slots must be approved. Reuses the amber approval palette. */
.daf-pricing-strip { padding: 8px 14px 10px 224px; background: #fffbf0; border-bottom: 1px solid #fde8c0; }
.daf-pricing-slot { padding: 5px 0 3px; border-top: 1px dashed #f0d9a8; }
.daf-pricing-slot:first-of-type { border-top: none; }
.daf-pricing-slot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daf-pricing-slot-label { font-size: 11px; font-weight: 600; color: #7a4000; }
.daf-pslot-status { font-size: 11px; margin-left: auto; }
.daf-pslot-actions { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.daf-pslot-cmt { flex: 1; min-height: 26px; }
