/* BILLING & CERTIFIED PAYROLL (2026-10-08). ws-* carries the shell; cp- is the rest.
   Dark by default, html.light below. */
.cp { display: flex; flex-direction: column; gap: 14px; }
.cp-i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.cp-lede { margin: 0; color: var(--gray-light, #aeaeb2); font-size: 14px; line-height: 1.6; max-width: 760px; }
.cp-dim { color: var(--gray-light, #aeaeb2); font-size: 12.5px; }
.cp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cp-card { text-align: left; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.03); padding: 14px 16px; color: var(--white, #fff); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform .16s ease, border-color .16s ease; }
.cp-card:hover { border-color: rgba(196,23,23,.45); transform: translateY(-1px); }
.cp-card-n { font-weight: 650; font-size: 15px; }
.cp-card-m { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--gray-light, #aeaeb2); }
.cp-card-m .is-ok { color: #37c27a; } .cp-card-m .is-warn { color: #e6a700; } .cp-card-m .is-dim { opacity: .75; }
.cp-test { padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(230,167,0,.35); background: rgba(230,167,0,.08); color: #f3cf6b; font-size: 13px; line-height: 1.5; }
.cp-test.is-bad { border-color: rgba(255,92,92,.35); background: rgba(255,92,92,.08); color: #ff9a9a; }

/* setup */
.cp-setup { display: flex; gap: 16px; padding: 22px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }
.cp-setup-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #c41717; }
.cp-setup h2 { margin: 2px 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.cp-setup p, .cp-setup li { font-size: 14px; line-height: 1.65; color: var(--gray-lighter, #d2d2d7); }
.cp-setup ul { margin: 8px 0 10px 18px; padding: 0; }
.cp-setup .up-btn { margin-top: 8px; }

/* the period bar */
.cp-period { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; background: rgba(255,255,255,.03); }
.cp-period-l { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; flex: 1 1 420px; }
.cp-sel { display: flex; flex-direction: column; gap: 4px; }
.cp-sel span, .cp-due span { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-light, #aeaeb2); }
.cp-sel select {
    appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: 650; color: inherit; cursor: pointer;
    padding: 8px 34px 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background-color: rgba(255,255,255,.04);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat; background-position: right 11px center;
}
.cp-due { display: flex; flex-direction: column; gap: 4px; }
.cp-due b { font-size: 14px; }
.cp-due.is-past b { color: #ff7a7a; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: var(--gray-lighter, #d2d2d7); }
.cp-tag.is-ok { color: #37c27a; border-color: rgba(55,194,122,.4); } .cp-tag.is-warn { color: #e6a700; border-color: rgba(230,167,0,.4); }
.cp-tag.is-bad { color: #ff7a7a; border-color: rgba(255,92,92,.4); } .cp-tag.is-dim { opacity: .75; }
.cp-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-count { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; font-size: 13px; background: rgba(255,255,255,.04); }
.cp-count b { font-size: 17px; font-variant-numeric: tabular-nums; }
.cp-count.is-ok { color: #37c27a; } .cp-count.is-warn { color: #e6a700; } .cp-count.is-bad { color: #ff7a7a; }
.cp-period-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cp-period-acts .up-btn, .cp-period-acts .sr-act { display: inline-flex; align-items: center; gap: 6px; }
.cp-sched { margin: -6px 2px 0; }

/* the list */
.cp-list { display: flex; flex-direction: column; gap: 8px; }
.cp-list-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cp-list-h h2 { margin: 0; font-size: 17px; } .cp-list-h small { color: var(--gray-light, #aeaeb2); font-weight: 500; margin-left: 6px; }
.cp-list-acts { display: flex; gap: 8px; flex-wrap: wrap; } .cp-list-acts .sr-act { display: inline-flex; align-items: center; gap: 6px; }
.cp-row { border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.025); overflow: hidden; }
.cp-row.is-open { border-color: rgba(255,255,255,.18); }
.cp-row-main { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) auto 18px; align-items: center; gap: 12px; padding: 12px 14px; font: inherit; color: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; }
.cp-row-main:hover { background: rgba(255,255,255,.03); }
.cp-st { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.cp-st .cp-i { width: 17px; height: 17px; }
.cp-row.is-submitted .cp-st { background: #1f9d5b; color: #fff; }
.cp-row.is-late .cp-st { background: rgba(230,167,0,.18); color: #e6a700; }
.cp-row.is-pending .cp-st { background: rgba(255,255,255,.06); color: var(--gray-light, #aeaeb2); }
.cp-row.is-withheld .cp-st { background: rgba(255,92,92,.14); color: #ff7a7a; }
.cp-co, .cp-who, .cp-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-co b { font-size: 14.5px; } .cp-co small, .cp-who small, .cp-state small { font-size: 12px; color: var(--gray-light, #aeaeb2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-who span { font-size: 13px; }
.cp-state b { font-size: 13px; }
.cp-row.is-submitted .cp-state b { color: #37c27a; } .cp-row.is-late .cp-state b { color: #e6a700; } .cp-row.is-withheld .cp-state b { color: #ff7a7a; }
.cp-docs { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--gray-light, #aeaeb2); }
.cp-chev .cp-i { transition: transform .18s ease; color: var(--gray-light, #aeaeb2); }
.cp-row.is-open .cp-chev .cp-i { transform: rotate(90deg); }
.cp-row-body { padding: 4px 16px 14px 60px; display: flex; flex-direction: column; gap: 8px; }
.cp-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cp-files li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: 13px; }
.cp-file-n { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-ib { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); color: inherit; }
.cp-ib:hover { border-color: rgba(196,23,23,.5); }
.cp-note { margin: 0; padding: 8px 12px; border-left: 3px solid rgba(255,255,255,.18); font-size: 13px; color: var(--gray-lighter, #d2d2d7); white-space: pre-wrap; }
.cp-row-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cp-row-acts .sr-act { display: inline-flex; align-items: center; gap: 6px; }
.cp-row-acts .is-danger { color: #ff8f8f; }
.cp-carry { padding: 14px 16px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.16); }
.cp-carry h3 { margin: 0 0 8px; font-size: 14px; } .cp-carry p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.cp-fold { font: inherit; font-size: 12.5px; color: var(--gray-light, #aeaeb2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.cp-log ul, .cp-removed ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.cp-removed li { display: flex; align-items: center; gap: 8px; }

@media (max-width: 900px) {
    .cp-row-main { grid-template-columns: 34px minmax(0, 1fr) auto 18px; }
    .cp-who { display: none; }
    .cp-state { grid-column: 2 / 3; grid-row: 2; }
    .cp-row-body { padding-left: 16px; }
    .cp-period-acts { margin-left: 0; }
}

html.light .cp-card, html.light .cp-period, html.light .cp-row, html.light .cp-setup { background: #fff; border-color: rgba(0,0,0,.09); color: #111; }
html.light .cp-setup p, html.light .cp-setup li, html.light .cp-tag, html.light .cp-note { color: #3a3a3c; }
html.light .cp-row.is-open { border-color: rgba(0,0,0,.18); }
html.light .cp-row-main:hover { background: rgba(0,0,0,.025); }
html.light .cp-files li, html.light .cp-count { background: #f5f5f7; }
html.light .cp-sel select { border-color: rgba(0,0,0,.14); background-color: #fff; }
html.light .cp-tag { border-color: rgba(0,0,0,.14); }
html.light .cp-ib { border-color: rgba(0,0,0,.12); }
html.light .cp-row.is-pending .cp-st { background: #f0f0f2; color: #6e6e73; }
html.light .cp-count.is-ok, html.light .cp-tag.is-ok, html.light .cp-row.is-submitted .cp-state b, html.light .cp-card-m .is-ok { color: #178a4f; }
html.light .cp-count.is-warn, html.light .cp-tag.is-warn, html.light .cp-row.is-late .cp-state b, html.light .cp-card-m .is-warn { color: #9a6a00; }
html.light .cp-count.is-bad, html.light .cp-tag.is-bad, html.light .cp-row.is-withheld .cp-state b, html.light .cp-due.is-past b { color: #c41717; }
html.light .cp-test { color: #7a5200; background: #fff8e6; border-color: #f0d48a; }
html.light .cp-test.is-bad { color: #8a1111; background: #fff1f1; border-color: #f3b4b4; }
html.light .cp-carry { border-color: rgba(0,0,0,.18); }
html.light .cp-note { border-left-color: rgba(0,0,0,.18); }

/* Electronic signatures (2026-10-26): the period's approval for payment, and each contractor's signature. */
.cp-approval { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background-color: rgba(255,255,255,.03); font-size: 13.5px; line-height: 1.5; color: var(--gray-lighter, #d2d2d7); }
.cp-approval > span { flex: 1 1 280px; }
.cp-approval .cp-i { width: 18px; height: 18px; flex: none; }
.cp-approval.is-ok { border-color: rgba(55,194,122,.4); background-color: rgba(55,194,122,.08); color: #7be0a8; }
.cp-approval.is-warn { border-color: rgba(230,167,0,.4); background-color: rgba(230,167,0,.08); color: #f3cf6b; }
.cp-approval.is-dim { opacity: .8; }
.cp-esign { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 9px 12px; border-radius: 10px; background-color: rgba(55,194,122,.08); color: #7be0a8; font-size: 13px; }
.cp-esign > span { flex: 1 1 240px; }
.cp-esign .cp-i { width: 16px; height: 16px; flex: none; }
.cp-mono { font-family: var(--font-mono, ui-monospace, Menlo, Consolas, monospace); font-size: 12px; letter-spacing: .04em; }
html.light .cp-approval { border-color: rgba(0,0,0,.12); background-color: #fff; color: #3a3a3c; }
html.light .cp-approval.is-ok { border-color: #a9dcbf; background-color: #eef9f2; color: #146c3e; }
html.light .cp-approval.is-warn { border-color: #f0d48a; background-color: #fff8e6; color: #7a5200; }
html.light .cp-esign { background-color: #eef9f2; color: #146c3e; }
@media (max-width: 640px) { .cp-approval .up-btn, .cp-approval .sr-act { width: 100%; justify-content: center; } }
