/* Accounting extras */
.neg { color: #b91c1c; }
.pos { color: #15803d; }
.b { font-weight: 700; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f3f7fb; }
.stat.click { cursor: pointer; }
.stat.sel { outline: 2px solid #0b3a63; }
tr.voidrow td { opacity: .5; text-decoration: line-through; }
tr.voidrow td:nth-child(2) { text-decoration: none; }
.grouprow td { background: #eef3f8; font-weight: 700; color: #0b3a63; text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; }
tr.subtot td { background: #fafbfd; font-weight: 600; }
tr.total td { border-top: 2px solid #c8d3df; font-weight: 700; background: #f4f7fa; }
tr.grand td { border-top: 3px double #0b3a63; font-weight: 700; background: #eaf0f6; font-size: 14px; }
tr.totrow td { font-weight: 700; background: #f4f7fa; }
td.ind { padding-left: 26px !important; }
.report table td.num, .report table th.num { min-width: 120px; }
table.lineed td { vertical-align: top; padding: 4px; }
table.lineed input, table.lineed select, table.lineed textarea { width: 100%; padding: 6px 7px; font: inherit; }
table.lineed textarea { resize: vertical; min-height: 34px; }
table.lineed tfoot td { border: 0; }
.todo { border-left: 4px solid #d97706; }
.todoitem { display: block; padding: 4px 0; color: #92400e; }
.bars { display: flex; gap: 10px; align-items: flex-end; height: 200px; padding-top: 10px; }
.bcol { flex: 1; text-align: center; }
.bpair { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 145px; }
.bpair span { width: 40%; max-width: 26px; border-radius: 3px 3px 0 0; display: block; }
.bi, .lg.bi { background: #0b3a63; }
.be, .lg.be { background: #e5a663; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin: 0 3px 0 8px; }
.docinfo { display: flex; gap: 22px; margin-bottom: 8px; flex-wrap: wrap; }
.docinfo > div { flex: 0 1 auto; }
.recsum { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-end; }
.recsum b { font-size: 16px; }
.recsum > div { flex: 0 1 auto; }
tr.sub > td { background: #fbfcfe; }
table.inner { width: 100%; font-size: 12.5px; }
table.inner td { padding: 3px 6px; border: 0; }
@media print { .side, .topbar, .pagehead .actions, .filters, .modebar, .btn { display: none !important; } .main { padding: 0 !important; } .shell { display: block !important; } }

/* ---- from the Security Money app: yearly forecast sheet, badges, approvals ---- */
/* yearly forecast sheet */
.fgridwrap { max-height: 70vh; overflow: auto; }
table.fgrid { font-size: 12.5px; }
table.fgrid th, table.fgrid td { white-space: nowrap; padding: 6px 8px; }
table.fgrid thead th { position: sticky; top: 0; background: #f4f7fa; z-index: 1; }
table.fgrid thead tr:nth-child(2) th { top: 31px; }
table.fgrid th.yr { text-align: center; background: #0b3a63; color: #fff; letter-spacing: .1em; }
table.fgrid th.blank { background: #fff; }
table.fgrid tfoot td { position: sticky; bottom: 0; background: #eaf0f6; border-top: 2px solid #0b3a63; }
.fcv { color: #1d4ed8; font-style: italic; }
.curm { background: #fff8e6 !important; }
@media print { .side, .topbar, .pagehead .actions, .filters, .modebar, .tabs, .btn { display: none !important; } .shell { display: block !important; } .main { padding: 0 !important; } .fgridwrap { max-height: none; overflow: visible; } }
/* withdraw form */
.wdgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; align-items: end; }
.wdgrid .wdwide { grid-column: span 2; }
.wdgrid input.ro { background: #f6f8fb; border-style: dashed; color: #111; font-weight: 600; }
.wdbal input.ro { font-size: 16px; text-align: right; }
input.ro.neg { color: #b91c1c; }
.wdsep { border-top: 1px dashed #b8c2cf; margin: 12px 0; }
.wdline { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px 16px; align-items: end; padding: 6px 0; border-bottom: 1px dotted #e3e7ee; }
@media (max-width: 640px) { .wdgrid { grid-template-columns: 1fr; } .wdgrid .wdwide { grid-column: auto; } .wdline { grid-template-columns: 1fr 1fr auto; } }
/* forecast sheet: grid lines, frozen columns, zoom */
.fgtools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zoomctl { display: inline-flex; gap: 2px; }
.zoomctl .btn { min-width: 34px; justify-content: center; }
table.fgrid.gl th, table.fgrid.gl td { border: 1px solid #d3dae3; }
table.fgrid { border-collapse: separate; border-spacing: 0; }
table.fgrid .fzc { position: sticky; z-index: 2; background: #fff; }
table.fgrid tbody tr:nth-child(even) .fzc { background: #fafbfd; }
table.fgrid thead .fzc { z-index: 4; background: #f4f7fa; }
table.fgrid thead tr:first-child .fzc { background: #fff; }
table.fgrid tfoot .fzc { z-index: 4; background: #eaf0f6; }
table.fgrid .fzlast { box-shadow: 3px 0 4px -2px rgba(15, 40, 70, .25); }
table.fgrid tbody tr:hover td { background: #eef5ff; }

.fgrid th.yr .yrl{position:sticky;left:6px;display:inline-block}

/* ---------- v7: dashboard, approvals, budget, forecast columns ---------- */
.side nav a{position:relative}
.navbadge{display:inline-block;min-width:19px;height:19px;line-height:19px;padding:0 5px;margin-left:8px;border-radius:10px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;text-align:center;vertical-align:1px}
.navbadge[hidden]{display:none}
.dashgrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,470px),1fr));gap:14px;margin-top:4px}
.dashgrid .card{margin:0}
.wfchart svg{width:100%;height:auto;display:block}.wfchart .gl{stroke:#e5e9f0;stroke-width:1}.wfchart .ax{font-size:11px;fill:#6b7280}
.wflg{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:#4b5563;margin:2px 0 6px 46px}.wflg i{display:inline-block;width:11px;height:11px;border-radius:2px;margin-right:5px;vertical-align:-1px}.wflg i.ln{height:3px;width:16px;vertical-align:3px}
.hbars{display:flex;flex-direction:column;gap:7px}.hb{display:grid;grid-template-columns:minmax(90px,34%) 1fr auto;gap:8px;align-items:center;font-size:13px}
.hb .hl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hb .ht{height:12px;background:#f1f4f8;border-radius:6px;overflow:hidden}.hb .ht i{display:block;height:100%;border-radius:6px}
.hb .hv{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.hb .hv small{display:block;color:#6b7280;font-size:11px}
.bvasum{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;margin-top:6px}.neg{color:#dc2626}.pos{color:#047857}
.selbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;margin:0 0 10px;background:#0b3a63;color:#fff;border-radius:10px}.selbar a{color:#cfe0f1}
.wfdots{display:inline-flex;gap:3px;vertical-align:middle;margin-left:4px}.wfdots i{width:9px;height:9px;border-radius:50%;background:#d1d5db}.wfdots i.on{background:#10b981}.wfdots i.x{background:#ef4444}
.wftable td{vertical-align:top}.wftable input[type=checkbox]{width:17px;height:17px}
.btn.ok{background:#059669;border-color:#059669;color:#fff}.btn.ok:hover{background:#047857}
.timeline{display:flex;gap:0;margin:14px 0 6px;flex-wrap:wrap}.timeline .tl{flex:1;min-width:150px;display:flex;gap:8px;position:relative;padding-right:10px}
.timeline .tl>i{flex:none;width:14px;height:14px;border-radius:50%;background:#e5e7eb;border:2px solid #d1d5db;margin-top:2px}.timeline .tl.on>i{background:#10b981;border-color:#059669}.timeline .tl.x>i{background:#ef4444;border-color:#dc2626}
.colsdlg{display:grid;grid-template-columns:1fr 1fr;gap:16px}.colsdlg>div{display:flex;flex-direction:column;gap:2px}.colsdlg b{margin-bottom:4px}
.fgtools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
table.fgrid td.negv{color:#dc2626}table.fgrid .ytdc{background:#eef3f9}table.fgrid tbody tr:nth-child(even) td{background-color:#fafbfd}table.fgrid tbody tr:nth-child(even) td.fzc{background:#fafbfd}
table.fgrid th.yr{background:#0b3a63;color:#fff;letter-spacing:3px;font-size:1.05em}
table.bedit td{padding:2px}table.bedit input.bc{width:86px;padding:5px 6px;text-align:right;font-variant-numeric:tabular-nums;border:1px solid #e5e9f0;border-radius:6px;font-size:13px}table.bedit input.bc:focus{border-color:#1d5f99;outline:none;background:#f5f9ff}
table.bvat .act{color:#b45309;font-size:.88em}
.kindsel{display:flex;gap:16px;margin:0 0 10px}.kindsel label{display:flex;align-items:center;gap:6px;font-weight:600}
@media (max-width:700px){.colsdlg{grid-template-columns:1fr}.hb{grid-template-columns:38% 1fr auto}}

.selbar[hidden]{display:none}
.dashgrid{align-items:start}
.wfchart{max-width:980px;margin:0 auto}.wfchart svg{max-height:320px}
table.fgrid th.yr{text-align:left}
table.bedit td:first-child,table.bedit th:first-child,table.bvat td:first-child,table.bvat th:first-child{position:sticky;left:0;background:#fff;z-index:1;box-shadow:2px 0 0 #e5e9f0}
table.bedit tfoot td:first-child,table.bvat tfoot td:first-child{background:#eef3f9}

/* ---- v2: permissions, verification, comments, bank accounts ---- */
.ctrl{margin:12px 0 4px;padding:10px 12px;border:1px solid #e3e9f1;border-radius:10px;background:#fafcff}
.ctrl .vline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ctrl .vok{color:#047857;font-weight:700}.ctrl .vno{color:#b45309;font-weight:700}
.ctrl .cm{margin-top:8px;border-top:1px dashed #dbe3ee;padding-top:8px}.ctrl .cmi{padding:6px 0;border-bottom:1px solid #eef2f7;font-size:13px}.ctrl .cmi b{font-size:12.5px}.ctrl .cmi .muted{font-size:11.5px}
.ctrl form{display:flex;gap:8px;margin-top:6px}.ctrl form input{flex:1}
.vbadge{display:inline-block;font-size:10.5px;font-weight:700;color:#047857;background:#d1fae5;border-radius:4px;padding:0 5px;margin-left:4px}
.permgrid{width:100%;border-collapse:collapse}.permgrid th,.permgrid td{padding:6px 8px;border-bottom:1px solid #eef2f7;text-align:left}.permgrid td select{width:100%}
.permgrid tr.diff td:first-child::after{content:" ●";color:#7c3aed}
.lvl{display:inline-block;min-width:16px;padding:1px 6px;border-radius:4px;font-size:11px;font-weight:700;text-align:center}
.lvl.none{background:#f3f4f6;color:#9ca3af}.lvl.view{background:#e0f2fe;color:#075985}.lvl.comment{background:#ede9fe;color:#5b21b6}.lvl.edit{background:#fef3c7;color:#92400e}.lvl.verify{background:#d1fae5;color:#065f46}
.bankcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px}.bankcard{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fff;box-shadow:var(--shadow)}
.bankcard .bk{font-weight:800;color:#0b3a63;font-size:15px}.bankcard .no{font-family:ui-monospace,Menlo,monospace;font-size:15px;letter-spacing:.5px;margin:4px 0}.bankcard .bal{font-size:20px;font-weight:800;margin-top:6px}
.ctrl .cm>b{display:block;margin-bottom:2px}

.bulkmk{display:inline-block;margin-left:3px;color:#7c3aed;font-weight:800;font-size:12px}
.bulkgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.bulkcard{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fafcff}.bulkcard b{font-size:14.5px}

/* ---------- Finance ---------- */
.ftrail { display: flex; gap: 0; margin: 10px 0 12px; flex-wrap: wrap; }
.fstep { flex: 1 1 140px; position: relative; padding: 0 10px 0 22px; display: flex; flex-direction: column; font-size: 12px; min-width: 120px; }
.fstep i { position: absolute; left: 4px; top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c7d0db; background: #fff; }
.fstep.on i { background: #117a4b; border-color: #117a4b; } .fstep.cur i { border-color: #b26b00; background: #fff4e0; }
.fstep b { font-size: 12.5px; } .fstep.cur b { color: #8a5300; }
.fbud { margin: 10px 0; padding: 9px 12px; border-radius: 8px; background: #eef4fb; color: #1b3a5c; font-size: 13px; }
.fbud.over { background: #fdecea; color: #a1281b; }
.fbgrid input { width: 78px; padding: 4px 6px; }
.fbgrid td { padding: 6px 6px; } .fbgrid tr.tot td { background: #f4f6f9; }
.fbu { font-size: 11px; color: #8a94a3; min-height: 13px; } .fbu.over { color: #b42318; font-weight: 700; }
.fbars { display: grid; gap: 10px; }
.fbar { display: grid; grid-template-columns: minmax(180px, 1.2fr) 2fr 56px; gap: 12px; align-items: center; }
.fbl { display: flex; flex-direction: column; }
.fbt { height: 12px; background: #eef1f5; border-radius: 6px; overflow: hidden; } .fbt i { display: block; height: 100%; background: #117a4b; border-radius: 6px; }
.fbt i.near { background: #c27a00; } .fbt i.over { background: #b42318; }
.cfchart { display: flex; gap: 14px; align-items: flex-end; justify-content: space-around; height: 200px; padding: 8px 4px 0; }
.cfc { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.cfc i { display: block; width: 70%; max-width: 64px; background: #0f4c81; border-radius: 6px 6px 0 0; } .cfc i.neg { background: #b42318; }
tr.tot td { font-weight: 700; background: #f7f9fb; } tr.muted td { color: #7a8494; }
label.chk { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
@media (max-width: 640px) { .fbar { grid-template-columns: 1fr; } .fstep { flex-basis: 45%; } }

/* payroll */
.paygrid { font-size: 13px; } .paygrid td, .paygrid th { padding: 6px 5px; vertical-align: top; } .paygrid input.num { padding: 3px 4px; text-align: right; font-size: 13px; }
.paygrid td:first-child { min-width: 150px; }
.paygrid td.click { cursor: pointer; } .paygrid td.click:hover b { color: var(--brand, #0f4c81); text-decoration: underline; }
.paygrid sup { color: #b26b00; font-size: 10px; }

.fdoc { width: 100%; height: calc(100vh - 190px); min-height: 420px; border: 1px solid #dfe5ec; border-radius: 8px; background: #fff; display: block; }
.modal.wide:has(.fdoc) { max-width: 900px; }
