/* SafeSign tokens - copied verbatim from https://safesign.auld-white.com (keep this block diffable) */
:root {
  --brand: #0093D0; --brand-dk: #007AB5; --brand-lt: #EDF4F7; --gold: #F6BB60;
  --bg: #edf4f7; --surf: #ffffff; --surf2: #f6fafb; --bdr: #ced5d9; --bdr2: #b7c3c8;
  --txt: #231f20; --txt2: #666465; --txt3: #829299;
  --green: #16a34a; --red: #dc2626; --amber: #d97706;
  --shadow: 0 1px 3px rgba(35,31,32,.07), 0 1px 2px rgba(35,31,32,.05);
  --shadow-md: 0 4px 8px -2px rgba(35,31,32,.1), 0 2px 4px -2px rgba(35,31,32,.06);
  --r: 6px;
}
/* ---- SafeSign component styles (copied) ---- */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--txt); font-family: Inter, sans-serif; font-size: 13px; line-height: 1.55; font-weight: 400; }
::selection { background: var(--brand); color: #fff; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: flex; height: 100vh; overflow: hidden; }
.sb { background: #231f20; border-right: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; width: 200px; flex-shrink: 0; overflow: hidden; }
.sb-logo { padding: 14px 14px 12px; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; background: #231f20; }
.sb-logo-icon { width: 28px; height: 28px; border-radius: 5px; background: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0; }
.sb-logotxt { font-family: Arial, Helvetica, sans-serif; font-weight: 600; font-size: 12.5px; color: var(--brand); letter-spacing: .01em; line-height: 1.2; margin-top: 4px; }
.sb-logosub { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #fff; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; line-height: 1.25; }
.sb-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sb-section-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #ffffff4d; padding: 0 8px; margin-bottom: 2px; margin-top: 14px; }
.ni { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 4px; cursor: pointer; font-size: 12.5px; font-weight: 400; color: #ffffffa6; transition: all .12s; white-space: nowrap; text-decoration: none; }
.ni:hover { background: #ffffff14; color: #fff; text-decoration: none; }
.ni.active { background: #0093d038; color: #fff; font-weight: 600; border-left: 2px solid var(--brand); }
.ni .cnt { font-size: 10.5px; background: #ffffff1f; border-radius: 9px; padding: 0 7px; color: #fff; }
.sb-footer { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11.5px; color: #fff6; }
.sb-footer .user-name { font-weight: 600; color: #ffffffbf; font-size: 12px; }
.sb-footer .user-role { font-size: 10px; color: #ffffff59; margin-bottom: 8px; }
.main { flex: 1; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; background: var(--bg); min-width: 0; }
.ph { padding: 14px 22px 12px; border-bottom: 1px solid var(--bdr); background: var(--surf); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; flex-wrap: wrap; gap: 9px; box-shadow: var(--shadow); }
.ph-title { font-size: 17px; font-weight: 600; color: var(--txt); letter-spacing: -.02em; }
.ph-sub { font-size: 11.5px; color: var(--txt3); }
.ph-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.page-body { padding: 18px 22px; flex: 1; }
.card { background: var(--surf); border: 1px solid var(--bdr); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ch { padding: 11px 15px; border-bottom: 1px solid var(--bdr); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct { font-size: 12.5px; font-weight: 600; color: var(--txt); }
.ct-sub { font-size: 11px; color: var(--txt3); margin-top: 1px; }
.card-body { padding: 15px; }
.sc { background: var(--surf); border: 1px solid var(--bdr); border-radius: var(--r); padding: 15px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.sv { font-size: 26px; font-weight: 700; color: var(--txt); line-height: 1; margin-top: 7px; letter-spacing: -.02em; }
.sl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--txt3); margin-top: 5px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #fff; padding: 8px 13px; text-align: left; border-bottom: 1px solid #666465; background: #231f20; white-space: nowrap; }
.tbl td { font-size: 12.5px; padding: 9px 13px; border-bottom: 1px solid var(--bdr); vertical-align: middle; color: var(--txt); }
.tbl tbody tr:nth-child(2n) { background: #f6fafb; }
.tbl tbody tr:nth-child(odd) { background: #fff; }
.tbl tbody tr.click:hover { background: #0093d012; cursor: pointer; }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.tc, .tbl td.tc { text-align: center; }
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 5px; font-size: 12.5px; font-weight: 500; cursor: pointer; border: 1px solid; transition: all .12s; font-family: Inter, sans-serif; line-height: 1.4; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:disabled, .btn.off { opacity: .45; cursor: not-allowed; }
.btn-p { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-p:hover:not(:disabled) { background: var(--brand-dk); border-color: var(--brand-dk); }
.btn-ok { background: var(--green); color: #fff; border-color: var(--green); }
.btn-ok:hover:not(:disabled) { filter: brightness(.92); }
.btn-s { background: #fff; color: var(--txt2); border-color: var(--bdr2); }
.btn-s:hover:not(:disabled) { background: var(--surf2); color: var(--txt); }
.btn-d { background: #fff; color: #dc2626; border-color: #fca5a5; }
.btn-d:hover:not(:disabled) { background: #fef2f2; }
.btn-sm { padding: 3px 9px; font-size: 11.5px; }
.btn-ghost { background: transparent; color: var(--txt2); border: none; padding: 5px 9px; font-size: 12.5px; font-family: Inter, sans-serif; cursor: pointer; border-radius: 5px; transition: color .12s; }
.btn-ghost:hover:not(:disabled) { color: var(--brand); }
.fi { width: 100%; background: #fff; border: 1px solid var(--bdr2); color: var(--txt); padding: 6px 9px; border-radius: 5px; font-size: 12.5px; font-family: Inter, sans-serif; }
.fi:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #0093cf1f; }
.sel { background: #fff; border: 1px solid var(--bdr2); color: var(--txt); padding: 5px 9px; border-radius: 5px; font-size: 12.5px; font-family: Inter, sans-serif; cursor: pointer; outline: none; width: 100%; }
.sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #0093cf1f; }
.fl-lbl { display: block; font-size: 11.5px; font-weight: 600; color: var(--txt2); margin-bottom: 4px; }
.form-group { margin-bottom: 13px; }
textarea.fi { resize: vertical; }
.badge { display: inline-flex; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: var(--surf2); color: var(--txt2); border: 1px solid var(--bdr); }
.badge-brand { background: #0093d01f; color: var(--brand-dk); }
.mo { position: fixed; inset: 0; background: #0006; display: none; align-items: center; justify-content: center; z-index: 999; padding: 16px; }
.mo.open { display: flex; }
.mo-box { background: #fff; border: 1px solid var(--bdr); border-radius: 10px; width: 490px; max-width: 96vw; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-md); }
.mo-header { padding: 14px 18px; border-bottom: 1px solid var(--bdr); display: flex; align-items: center; justify-content: space-between; }
.mo-title { font-size: 14px; font-weight: 700; color: var(--txt); }
.mo-close { background: transparent; border: none; color: var(--txt3); font-size: 17px; cursor: pointer; line-height: 1; padding: 2px 5px; border-radius: 4px; }
.mo-close:hover { color: var(--txt); background: var(--surf2); }
.mo-body { padding: 16px 18px; }
.mo-footer { padding: 12px 18px; border-top: 1px solid var(--bdr); display: flex; justify-content: flex-end; gap: 8px; background: var(--surf2); }
.mo-note { font-size: 11.5px; color: var(--txt2); padding: 7px 11px; background: #0093d012; border-radius: 6px; border-left: 3px solid var(--brand); margin-bottom: 13px; line-height: 1.5; }
.mo-warn { font-size: 11.5px; color: #92400e; padding: 7px 11px; background: #fef3c7; border-radius: 6px; border-left: 3px solid #fcd34d; margin-bottom: 13px; line-height: 1.5; }
.mo-danger { font-size: 11.5px; color: #991b1b; padding: 7px 11px; background: #fef2f2; border-radius: 6px; border-left: 3px solid #fca5a5; margin-bottom: 13px; line-height: 1.5; }
.empty { text-align: center; padding: 38px 20px; color: var(--txt3); font-size: 12.5px; }
.error-msg { font-size: 11.5px; color: var(--red); margin-top: 5px; }
.tabs { display: flex; border-bottom: 1px solid var(--bdr); padding: 0 15px; background: var(--surf); overflow-x: auto; }
.tab { padding: 9px 15px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--txt3); border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .12s; font-family: Inter, sans-serif; white-space: nowrap; }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab:hover:not(.on) { color: var(--txt); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--surf); border: 1px solid var(--bdr); border-radius: 10px; box-shadow: var(--shadow-md); padding: 28px; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.login-logo-name { font-size: 18px; font-weight: 700; color: var(--txt); letter-spacing: -.02em; }
.login-logo-sub { font-size: 11px; color: var(--txt3); margin-top: 2px; }

/* ---- Invoice Review additions (use the tokens above) ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sc.warn .sv { color: var(--amber); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 11px 15px; border-bottom: 1px solid var(--bdr); background: var(--surf); }
.toolbar .fi { max-width: 280px; }
.chip { border: 1px solid var(--bdr2); background: #fff; color: var(--txt2); border-radius: 14px; padding: 2px 11px; font-size: 11.5px; cursor: pointer; font-family: Inter, sans-serif; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--gold); }
.tbl th.sortable::after { content: " \2195"; opacity: .4; }
.tbl th.asc::after { content: " \2191"; opacity: 1; }
.tbl th.desc::after { content: " \2193"; opacity: 1; }
.tbl tr.sel-row { background: #0093d01c !important; }
.split { display: grid; grid-template-columns: minmax(420px, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.split.wide { grid-template-columns: minmax(0, 1fr); }
.pdf-pane { position: sticky; top: 12px; display: flex; flex-direction: column; height: calc(100vh - 28px); min-height: 560px; }
.pdf-pane iframe { flex: 1; width: 100%; border: 0; background: var(--surf2); }
.pdf-pane .empty { flex: 1; display: flex; align-items: center; justify-content: center; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; }
.kv .k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--txt3); }
.kv .v { font-size: 13px; margin-top: 1px; word-break: break-word; }
.kv .v.big { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.memo { white-space: pre-wrap; margin: 6px 0 0; font: inherit; font-size: 11.5px; color: var(--txt2); background: var(--surf2); border: 1px solid var(--bdr); border-radius: 5px; padding: 6px 9px; }
.actionbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 11px 15px; border-top: 1px solid var(--bdr); background: var(--surf2); }
.nav-pos { font-size: 11.5px; color: var(--txt3); }
.kbd { font: 10.5px "DM Mono", ui-monospace, monospace; border: 1px solid var(--bdr2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #fff; color: var(--txt2); }
.toast-host { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 1200; }
.toast { background: #231f20; color: #fff; border-left: 3px solid var(--brand); padding: 9px 14px; border-radius: 6px; box-shadow: var(--shadow-md); font-size: 12.5px; max-width: 360px; animation: toastin .18s ease-out; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes toastin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.readonly-banner { background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d; padding: 6px 22px; font-size: 11.5px; }
.sb-switch { padding: 10px 8px 0; margin: 0; }
.sb-switch .sb-section-lbl { display: block; margin-top: 4px; }
.sb-switch .sel { background: #ffffff14; color: #fff; border-color: #ffffff33; }
.sb-switch .sel option { color: #231f20; }
.grid-f { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.lookup { position: relative; }
/* Lookup lists float (position: fixed, placed by app.js) so dialogs never clip them or grow a scrollbar. */
.dd { position: fixed; z-index: 1001; background: #fff; border: 1px solid var(--bdr2); border-radius: 8px;
  box-shadow: 0 10px 28px #0f172a2e, 0 2px 6px #0f172a14; max-height: 280px; overflow-y: auto; display: none; padding: 4px 0; }
.dd.open { display: block; }
.opt { padding: 7px 12px; cursor: pointer; display: flex; gap: 12px; align-items: baseline; font-size: 12.5px; color: var(--txt); }
.opt:hover, .opt.hl { background: #0093d014; }
.opt.hl { box-shadow: inset 3px 0 0 var(--brand); }
.opt .code { font-family: "DM Mono", ui-monospace, monospace; font-size: 12px; color: var(--brand-dk); min-width: 64px; flex-shrink: 0;
  white-space: nowrap; }
.opt .desc { min-width: 0; flex: 1; line-height: 1.35; overflow-wrap: anywhere; }  /* full text, wrapping if long */
.opt .meta { margin-left: auto; color: var(--txt3); font-size: 11px; flex-shrink: 0; padding-left: 8px; }
.opt.empty-opt { color: var(--txt3); cursor: default; font-style: italic; }
.opt.empty-opt:hover { background: none; }
/* Logo: the AW mark is gold, white and charcoal, drawn for the cyan band (as on SafeSign) */
.sb-logomark img { display: block; object-fit: contain; }
.mtb img { object-fit: contain; }
.brand-card { width: 100%; max-width: 400px; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 40px rgba(35,31,32,.18); }
.brand-band { background: var(--brand); padding: 32px 36px 28px; text-align: center; }
.brand-logo { height: 70px; max-width: 200px; object-fit: contain; margin-bottom: 16px; }
.brand-app { font-size: 11px; font-weight: 500; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; }
.brand-body { background: var(--surf); padding: 28px 36px 32px; }
.brand-title { font-size: 16px; font-weight: 600; color: var(--txt); margin-bottom: 4px; letter-spacing: -.01em; }
.brand-sub { font-size: 12.5px; color: var(--txt3); margin-bottom: 18px; }
.line-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 150px; }
.seg { display: inline-flex; border: 1px solid var(--bdr2); border-radius: 5px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 5px 14px; font: 500 12.5px Inter, sans-serif; color: var(--txt2); cursor: pointer; border-right: 1px solid var(--bdr2); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; }
.seg button:disabled { color: var(--txt3); cursor: not-allowed; background: var(--surf2); }
#m-code .mo-box { min-height: 560px; display: flex; flex-direction: column; }
#m-code form { display: flex; flex-direction: column; flex: 1; }
#m-code .mo-body { flex: 1; min-height: 380px; }
.ln { padding: 12px 15px; border-bottom: 1px solid var(--bdr); }
.ln:last-child { border-bottom: 0; }
.ln-head { display: flex; gap: 12px; align-items: flex-start; }
.ln-no { width: 22px; height: 22px; border-radius: 50%; background: var(--surf2); border: 1px solid var(--bdr); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; color: var(--txt2); flex-shrink: 0; margin-top: 1px; }
.ln-main { flex: 1; min-width: 0; }
.ln-desc { font-weight: 500; }
.ln-desc.none { color: var(--txt3); font-style: italic; font-weight: 400; }
.ln-coding { font-size: 11.5px; color: var(--txt2); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 4px; background: #0093d01f; color: var(--brand-dk); }
.ln-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ln-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 9px 0 0 34px; flex-wrap: wrap; }
.ln-status { display: flex; gap: 6px; flex-wrap: wrap; }
.ln-acts { display: flex; align-items: center; gap: 6px; }
.ln-memo { margin: 6px 0 0 34px; }
.ln-memo summary { cursor: pointer; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-size: 11.5px; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:disabled { color: var(--txt3); cursor: not-allowed; text-decoration: none; }
.seg-sm button { padding: 3px 10px; font-size: 11.5px; }
.seg button.seg-ok:hover:not(:disabled) { background: #dcfce7; color: #15803d; }
.seg button.seg-bad:hover:not(:disabled) { background: #fee2e2; color: #b91c1c; }
.rv-cell { min-width: 220px; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.pip { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 10px; border: 1px solid var(--bdr2); background: #fff; color: var(--txt2); white-space: nowrap; }
.pip.approved { background: #dcfce7; border-color: #86efac; color: #15803d; }
.pip.rejected { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.pip.me { box-shadow: 0 0 0 2px var(--brand); }
.chain .arrow { color: var(--txt3); font-size: 12px; }
.rv-sub { font-size: 11.5px; color: var(--txt2); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.grp { font: 600 10.5px Inter, sans-serif; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--bdr2); background: var(--surf2); color: var(--txt2); cursor: pointer; }
.grp:hover { border-color: var(--brand); color: var(--brand-dk); }
.rv-person { display: flex; gap: 12px; padding: 10px 15px; border-bottom: 1px solid var(--bdr); }
.rv-person:last-child { border-bottom: 0; }
.rv-person.me { background: #0093d00d; }
.rv-comments { margin-top: 6px; }
.rv-comments summary { cursor: pointer; }
.rv-comments ul, .pop-list ul { margin: 4px 0 0; padding-left: 18px; font-size: 12px; color: var(--txt2); }
.rv-comments li, .pop-list li { margin-bottom: 2px; }
.pop-list .rv-person { padding: 10px 0; }
.strip { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; background: var(--surf); border: 1px solid var(--bdr);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 9px 15px; margin-bottom: 12px; font-size: 12px; color: var(--txt3); }
.strip b { font-size: 16px; color: var(--txt); margin-right: 5px; letter-spacing: -.01em; }
.strip .warn b { color: var(--amber); }
.toolbar.slim { padding: 8px 12px; }
.tbl-2line td { padding: 7px 12px; vertical-align: top; }
.tbl-2line .cell-main { font-weight: 600; }
.sub2 { font-size: 11px; color: var(--txt3); line-height: 1.35; margin-top: 2px; }
.sub2 a { color: var(--brand); }
.sub2 .linkbtn { font-size: 11px; }
.nowrap { white-space: nowrap; }
.tbl-2line .pip { font-size: 10px; padding: 0 5px; }
.strip .bad b { color: var(--red); }
.sub2.due-overdue { color: var(--red); font-weight: 600; }
.sub2.due-soon { color: var(--amber); font-weight: 600; }
.chip.chip-bad.on { background: var(--red); border-color: var(--red); }
.peek { margin-top: 12px; border-top: 1px solid var(--bdr); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.peek-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.peek-k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--txt3); width: 52px; flex-shrink: 0; }
.peek-v { color: var(--txt2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek .mini-chain { flex-wrap: nowrap; flex-shrink: 0; }
.peek .grp { flex-shrink: 0; }
.peek-v.trunc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek .linkbtn { font-size: 12px; white-space: nowrap; }
.mini-chain { display: inline-flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.mini-chain .pip { font-size: 10px; padding: 0 5px; }
.note-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--txt2); }
.note-list li { margin-bottom: 5px; }
.kv .v.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.ln-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.spill { font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--surf2); border: 1px solid var(--bdr); color: var(--txt2); white-space: nowrap; }
.spill.ok { background: #dcfce7; border-color: #86efac; color: #15803d; }
.spill.bad { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.ln-foot { margin-top: 6px; }
.act-ok:hover:not(:disabled) { background: #dcfce7; color: #15803d; border-color: #86efac; }
.act-bad:hover:not(:disabled) { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.memo-existing { max-height: 220px; overflow-y: auto; margin-bottom: 12px; }
.memo-existing:empty { display: none; }
.mtb { display: none; }
.counter { font-size: 11px; color: var(--txt3); text-align: right; margin-top: 3px; }
.counter.over { color: var(--red); }
/* Worklist: row type and next step */
.kind { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.kind.inv { background: #0093d01f; color: var(--brand-dk); }
.kind.rcpt { background: #f6bb6033; color: #8a5a00; }
.next { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.next.code { color: var(--amber); }
.next.appr { color: var(--green); }
.next.wait { color: var(--txt3); font-weight: 500; }
/* Bulk coding: checkbox column and the selection bar */
.bk-col { width: 34px; text-align: center; vertical-align: middle !important; }
.bk-col input { width: 15px; height: 15px; cursor: pointer; }
.bk-col input:disabled { cursor: not-allowed; opacity: .35; }
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 7px 15px; background: #0093d012; border-bottom: 1px solid var(--bdr);
  font-size: 12.5px; color: var(--txt); position: sticky; top: 0; z-index: 4; min-height: 40px; }
.bulk-bar.idle { background: var(--surf2); color: var(--txt3); }
.bulk-bar .bulk-hint { flex: 1; }
.bulk-bar:not(.idle) .bulk-hint, .bulk-bar.idle .bulk-count { display: none; }
/* Coding summary in the invoice grid */
.coding-cell { max-width: 230px; }
.cell-code { font-size: 12px; font-weight: 500; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.code-warn { color: var(--amber); font-weight: 600; }
/* One-click approve / reject in the invoice grid */
.qa-col { width: 74px; white-space: nowrap; text-align: right; vertical-align: middle !important; }
.qa-col form { display: inline; }
.qa-btn { width: 28px; height: 28px; border: 0; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; transition: filter .12s, transform .05s; }
.qa-btn + .qa-btn, .qa-col form + .qa-btn { margin-left: 4px; }
.qa-ok { background: var(--green); }
.qa-bad { background: var(--red); }
.qa-btn:hover:not(:disabled) { filter: brightness(.9); }
.qa-btn:active:not(:disabled) { transform: scale(.94); }
.qa-btn:disabled { background: var(--surf2); color: var(--txt3); border: 1px solid var(--bdr); cursor: not-allowed; }
.qa-btn.busy { background: var(--green); opacity: .6; }
/* Admin: Expenses placeholder, reviewer setup pages */
.ni.ni-soon { cursor: default; color: #ffffff59; font-style: italic; }
.ni.ni-soon:hover { background: none; color: #ffffff59; }
.muted { color: var(--txt3); font-weight: 400; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.members td { vertical-align: middle; }
.seq-cell { display: flex; align-items: center; gap: 3px; }
.seq-cell form { display: contents; }
.mini { width: 20px; height: 22px; padding: 0; border: 1px solid var(--bdr); border-radius: 4px; background: var(--surf); color: var(--txt2); font-size: 8px; cursor: pointer; line-height: 1; }
.mini:hover:not(:disabled) { background: var(--surf2); color: var(--brand); border-color: var(--brand); }
.mini:disabled { opacity: .4; cursor: not-allowed; }
.fi.fi-sm { padding: 3px 6px; font-size: 12px; width: 44px; text-align: center; }
.fi.fi-sm.num { width: 92px; text-align: right; }
.opts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--txt2); }
.opts label, label.opts { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; white-space: nowrap; }
.opts.col { flex-direction: column; align-items: flex-start; gap: 6px; }
.add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 11px 15px; border-top: 1px solid var(--bdr); background: var(--surf2); }
.card-body .add-row, .mo-body .add-row { padding: 0; border: 0; background: none; }
.add-row .sel { max-width: 240px; }
.row-off td { opacity: .55; }
.row-off td:last-child { opacity: 1; }
.linkbtn.danger { color: var(--red); }
.un-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--bdr); font-size: 12.5px; }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } .pdf-pane { position: static; height: 70vh; } }
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .mtb { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #231f20; flex-shrink: 0; color: #fff; font-weight: 600; }
  .mtb button { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
  .sb { position: fixed; inset: 0 auto 0 0; z-index: 1000; width: 250px; max-width: 82vw; transform: translateX(-100%); transition: transform .15s; }
  .sb.open { transform: none; }
  .page-body { padding: 14px; }
  .ph { padding: 12px 14px 10px; }
  .card { overflow-x: auto; }
}
/* Expense receipt page: the image on the left at full height, the coding on the right (layout A, 2026-10-22) */
.rc-facts { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 12px; color: var(--txt2); margin-top: 3px; }
.rc-facts b { color: var(--txt); font-weight: 600; }
.rc-ref { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); gap: 16px; align-items: start; }
.rc-doc { position: sticky; top: 12px; display: flex; flex-direction: column; height: calc(100vh - 112px); min-height: 520px;
  background: var(--surf); border: 1px solid var(--bdr); border-radius: var(--r); overflow: hidden; }
.rc-docbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--bdr);
  background: var(--surf2); font-size: 12px; }
.rc-files { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; }
.rc-files a { color: var(--txt2); text-decoration: none; font-weight: 500; }
.rc-files a.on { color: var(--brand-dk); font-weight: 600; }
.rc-docacts { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.rc-docacts a { color: var(--brand-dk); text-decoration: none; font-weight: 600; }
.rc-docacts form { display: inline; }
.rc-view { flex: 1; width: 100%; border: 0; background: var(--surf2); }
.rc-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; background: var(--surf2); }
.rc-empty-t { font-size: 15px; font-weight: 600; color: var(--txt2); }
.rc-upload { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--bdr); }
.rc-upload .fi { flex: 1; min-width: 0; margin: 0; }
.rc-side .card-body { padding: 12px; }
.rc-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--txt3); margin-bottom: 8px; }
.rl { border: 1px solid var(--bdr); border-radius: 8px; padding: 10px; margin-bottom: 8px; display: grid; gap: 6px; background: var(--surf); }
.rl-top { display: flex; gap: 8px; align-items: center; }
.rl-top .rl-seg { flex-shrink: 0; }
.rl-top .rl-seg button { white-space: nowrap; }
.rl-top .rl-amt { width: 110px; margin: 0 0 0 auto; text-align: right; }
.rl .rl-job { display: grid; gap: 6px; }
.rl .rl-pair { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 6px; }
.rl .rl-job[hidden], .rl .rl-gl[hidden] { display: none; }
.rl .lookup { position: relative; }
.rl .fi, .rl .sel { margin: 0; width: 100%; }
.rl .rl-del { height: 32px; width: 28px; font-size: 14px; flex-shrink: 0; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0 10px; font-size: 12.5px; color: var(--txt2); }
.rc-foot .ok { color: var(--green); font-weight: 600; }
.rc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-void { margin-top: 12px; padding: 0 2px; font-size: 12px; }
@media (max-width: 980px) { .rc-grid { grid-template-columns: minmax(0, 1fr); } .rc-doc { position: static; height: 70vh; } }
/* newest memo on a grid row: one line, opens in full (2026-10-22) */
.memo-chip { display: block; width: fit-content; max-width: 100%; margin-top: 4px; padding: 2px 8px 2px 2px; border: 1px solid #f6bb6066;
  background: #f6bb601a; border-radius: 5px; font: 400 11.5px Inter, sans-serif; color: var(--txt2); cursor: pointer; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-chip:hover { background: #f6bb6033; border-color: #f6bb60; color: var(--txt); }
.memo-chip b { font-weight: 600; color: var(--txt); }
.memo-chip .memo-k { margin-right: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8a5a00;
  background: #f6bb6040; border-radius: 3px; padding: 1px 5px; }
.memo-full { border-left: 3px solid #f6bb60; padding: 4px 0 4px 12px; }
.memo-by { margin-bottom: 6px; }
.memo-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; color: var(--txt); }
.memo-more { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
/* All Invoices/Expenses filters: search plus dropdowns on one row, wrapping when narrow */
.all-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.all-filters #q { flex: 1 1 260px; min-width: 200px; margin: 0; }
.all-filters .sel { flex: 0 1 190px; width: auto; min-width: 150px; margin: 0; }
/* Code dialog: a remembered vendor rule, and the Remember box (2026-10-22) */
.rule-hint { background: #0093d012; border: 1px solid #0093d040; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; color: var(--txt2); margin-bottom: 12px; }
.rule-hint b { color: var(--txt); }
.remember { border: 1px dashed var(--bdr2); border-radius: 6px; padding: 9px 11px; margin-top: 12px; display: grid; gap: 6px; font-size: 12.5px; }
.remember[hidden] { display: none; }
.rem-scopes { display: grid; gap: 5px; padding-left: 22px; }
.rem-scopes[hidden], .rem-scopes label[hidden] { display: none; }
/* My coding rules: who a rule is for */
.who { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.who.all { background: #0093d01f; color: var(--brand-dk); }
.who.me { background: #f6bb6033; color: #8a5a00; }
.who.user { background: var(--surf2); color: var(--txt2); border: 1px solid var(--bdr); }
/* Post to Vista: the batch month beside the heading */
.post-month { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--txt2); }
.post-month .fi { width: 150px; margin: 0; }
/* My coding rules: the + New rule form */
.rule-new summary { cursor: pointer; list-style: none; }
.rule-new summary::-webkit-details-marker { display: none; }
.rule-new { margin-bottom: 16px; }
.rule-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 150px; gap: 4px 12px; align-items: start; }
.rule-form .rule-coding { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 180px; gap: 0 12px; }
.rule-form .rule-coding[hidden] { display: none; }
.rule-form #rf-gl { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.rule-for { display: flex; gap: 8px; }
.rule-for .sel[hidden] { display: none; }
.rule-save { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
@media (max-width: 900px) { .rule-form, .rule-form .rule-coding { grid-template-columns: 1fr; } }
.all-chips { padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
/* the invoice page's one-click Approve: the grid's quick-approve form, shaped as a normal button */
.qa-inline { display: contents; }
.btn.qa-btn { width: auto; height: auto; font-size: 13px; font-weight: 600; line-height: inherit; border-radius: var(--r-sm, 6px); }
.btn.qa-btn.busy { opacity: .7; cursor: progress; }
/* Admin -> SSO / SAML: SafeSign's and Orbit's SsoTab layout (copy rows, enable box, small upper-case section labels) */
.sso-wrap { max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.sso-urls { display: flex; flex-direction: column; gap: 10px; }
.sso-url { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surf2); border: 1px solid var(--bdr); border-radius: var(--r); }
.sso-url-main { flex: 1; min-width: 0; }
.sso-url-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--txt3); margin-bottom: 2px; }
.sso-url-val { font: 12.5px "DM Mono", ui-monospace, monospace; color: var(--txt); word-break: break-all; }
.sso-hint { font-size: 11.5px; color: var(--txt3); margin-top: 3px; line-height: 1.55; }
.sso-note { color: var(--txt3); font-weight: 400; }
.sso-mono { font-family: "DM Mono", ui-monospace, monospace; font-size: 12px; }
textarea.sso-mono { resize: vertical; width: 100%; }
.sso-form .form-group:last-child { margin-bottom: 0; }
.sso-enable { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px 12px; margin-bottom: 14px; background: var(--surf2); border: 1px solid var(--bdr); border-radius: var(--r); }
.sso-enable input, .sso-check input { width: 15px; height: 15px; accent-color: var(--brand); flex-shrink: 0; }
.sso-enable-t { font-weight: 600; font-size: 13px; }
.sso-section { border-top: 1px solid var(--bdr); padding-top: 14px; margin-top: 4px; margin-bottom: 14px; }
.sso-section-lbl { font-size: 12px; font-weight: 600; color: var(--txt2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; }
.sso-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; margin-bottom: 12px; }
.sso-check-t { font-weight: 500; }
.sso-save { width: 100%; justify-content: center; }
.sso-steps { margin-top: 20px; padding: 12px 14px; background: var(--brand-lt); border: 1px solid var(--bdr); border-left: 3px solid var(--brand); border-radius: var(--r); font-size: 12.5px; color: var(--txt2); line-height: 1.7; }
.sso-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--txt3); font-size: 11.5px; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; border-top: 1px solid var(--bdr); }
.btn-ms { width: 100%; justify-content: center; gap: 8px; }
/* attachment indicator on grid rows: a paperclip, faint and struck through when there is none (2026-11-20) */
.clip { font-size: 12px; margin-left: 4px; white-space: nowrap; color: var(--txt2); font-weight: 500; }
.clip.none { opacity: .35; filter: grayscale(1); text-decoration: line-through; }
/* drag & drop attachments (invoice attachments pane, receipt image) */
[data-drop] { position: relative; }
[data-drop].drop-on::after { content: "Drop to attach"; position: absolute; inset: 6px; z-index: 5; display: flex; align-items: center;
  justify-content: center; border: 2px dashed var(--brand); border-radius: 8px; background: #0093d01a; color: var(--brand-dk);
  font-weight: 700; font-size: 15px; pointer-events: none; }
[data-drop].drop-busy { opacity: .6; cursor: progress; }
.attach-bar { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 8px 12px; border-bottom: 1px solid var(--bdr); flex-wrap: wrap; }
.attach-bar label.btn { cursor: pointer; }
.dragging-files [data-drop] iframe { pointer-events: none; }
