/* Financials Online - classic Windows / VB6 desktop look */
* { box-sizing: border-box; }
body { margin: 0; font: 12px Tahoma, "Segoe UI", Verdana, sans-serif; background: #3a6ea5; color: #000; }
a { color: #0b3d91; }
.titlebar { background: linear-gradient(90deg, #0a246a, #a6caf0); color: #fff; font-weight: bold; padding: 4px 8px; display: flex; justify-content: space-between; }
.titlebar small { font-weight: normal; }
.menubar { background: #d4d0c8; border-bottom: 1px solid #808080; display: flex; padding: 0 2px; user-select: none; position: relative; z-index: 50; }
.menu { position: relative; }
.menu > .mtitle { padding: 3px 8px; cursor: default; display: block; }
.menu:hover > .mtitle, .menu.open > .mtitle { background: #0a246a; color: #fff; }
.menu .drop { display: none; position: absolute; left: 0; top: 100%; background: #d4d0c8; border: 1px solid; border-color: #fff #404040 #404040 #fff; box-shadow: 2px 2px 0 #808080; min-width: 240px; padding: 2px; }
.menu:hover .drop, .menu.open .drop { display: block; }
.drop a, .drop span.dis { display: block; padding: 3px 18px; color: #000; text-decoration: none; white-space: nowrap; }
.drop span.dis { color: #9a9a9a; cursor: not-allowed; }
.drop a:hover { background: #0a246a; color: #fff; }
.drop .nb { color: #808080; }
.drop .nb:hover { background: #d4d0c8; color: #808080; }
.drop hr { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; margin: 3px 2px; }
.guess { font-size: 9px; color: #a00; vertical-align: super; }
.toolbar { background: #d4d0c8; border-bottom: 1px solid #808080; padding: 2px 4px; display: flex; gap: 2px; }
.toolbar a { padding: 2px 8px; border: 1px solid transparent; color: #000; text-decoration: none; }
.toolbar a:hover { border-color: #fff #808080 #808080 #fff; }
.desk { padding: 14px; min-height: calc(100vh - 90px); }
.win { background: #d4d0c8; border: 2px solid; border-color: #fff #404040 #404040 #fff; max-width: 1180px; margin: 0 auto 14px; box-shadow: 3px 3px 6px rgba(0,0,0,.35); }
.win.narrow { max-width: 420px; }
.win > .wt { background: linear-gradient(90deg, #0a246a, #a6caf0); color: #fff; font-weight: bold; padding: 3px 6px; display: flex; justify-content: space-between; align-items: center; }
.win > .wt .x { background: #d4d0c8; color: #000; border: 1px solid; border-color: #fff #404040 #404040 #fff; padding: 0 5px; font-size: 11px; text-decoration: none; }
.win > .wb { padding: 10px; }
.statusbar { position: fixed; bottom: 0; left: 0; right: 0; background: #d4d0c8; border-top: 1px solid #fff; display: flex; font-size: 11px; }
.statusbar span { border: 1px solid; border-color: #808080 #fff #fff #808080; padding: 1px 8px; margin: 1px; }
fieldset { border: 1px solid #808080; box-shadow: 1px 1px 0 #fff inset; margin: 0 0 8px; padding: 6px 8px; }
legend { padding: 0 4px; }
input, select, textarea { font: 12px Tahoma, sans-serif; border: 2px solid; border-color: #808080 #fff #fff #808080; background: #fff; padding: 2px 3px; }
input[readonly] { background: #ece9d8; }
button, .btn { font: 12px Tahoma, sans-serif; background: #d4d0c8; border: 2px solid; border-color: #fff #404040 #404040 #fff; padding: 3px 14px; cursor: pointer; color: #000; text-decoration: none; display: inline-block; }
button:active, .btn:active { border-color: #404040 #fff #fff #404040; }
button.primary { font-weight: bold; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.grid { width: 100%; border-collapse: collapse; background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.grid th { background: #d4d0c8; border: 1px solid; border-color: #fff #808080 #808080 #fff; padding: 3px 5px; text-align: left; font-weight: normal; position: sticky; top: 0; }
.grid td { border-bottom: 1px solid #e5e5e5; border-right: 1px solid #eee; padding: 2px 5px; vertical-align: top; }
.grid tr:hover td { background: #fffbe0; }
.grid td.n, .grid th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grid tr.grp td { background: #e8e8f4; font-weight: bold; }
.grid tr.sub td { background: #f4f4f4; font-weight: bold; }
.grid tr.tot td { background: #d4d0c8; font-weight: bold; border-top: 2px solid #000; }
.scroll { max-height: 62vh; overflow: auto; }
.flash { padding: 6px 10px; margin: 0 auto 10px; max-width: 1180px; border: 1px solid; }
.flash.error { background: #ffe0e0; border-color: #c00; }
.flash.ok { background: #e0ffe0; border-color: #080; }
.muted { color: #555; }
.bad { color: #b00; font-weight: bold; }
.good { color: #070; font-weight: bold; }
.tag { display: inline-block; padding: 0 4px; border: 1px solid #888; background: #eee; font-size: 11px; }
.tag.unp { background: #ffd; border-color: #aa0; }
.tag.can { background: #fdd; border-color: #a00; }
/* JV grid */
#jvgrid input.acc { width: 100%; }
#jvgrid input.amt { width: 120px; text-align: right; }
#jvgrid input.nar { width: 100%; }
#jvgrid td { padding: 1px 2px; }
.ac { position: absolute; background: #fff; border: 1px solid #000; max-height: 260px; overflow-y: auto; z-index: 100; min-width: 460px; box-shadow: 2px 2px 4px rgba(0,0,0,.4); }
.ac div { padding: 2px 6px; cursor: pointer; white-space: nowrap; }
.ac div.sel, .ac div:hover { background: #0a246a; color: #fff; }
.ac div small { color: #777; }
.ac div.sel small { color: #ccc; }
.totals { font-weight: bold; }
.pager a, .pager span { margin-right: 6px; }
/* print */
.print-page { background: #fff; max-width: 1000px; margin: 0 auto; padding: 18px 24px; }
.print-page h1 { font-size: 18px; margin: 0; text-align: center; }
.print-page h2 { font-size: 14px; margin: 2px 0 10px; text-align: center; font-weight: normal; }
.print-page .grid { border: 1px solid #000; }
.print-page .grid th { background: #eee; border: 1px solid #000; position: static; }
.print-page .grid td { border: 1px solid #999; }
.noprint { margin-bottom: 10px; }
.sig { display: flex; justify-content: space-between; margin-top: 50px; }
.sig div { border-top: 1px solid #000; width: 22%; text-align: center; padding-top: 3px; }
@media print {
  body { background: #fff; }
  .noprint, .menubar, .titlebar, .toolbar, .statusbar { display: none !important; }
  .print-page { padding: 0; max-width: none; }
  .grid tr { page-break-inside: avoid; }
  @page { size: A4; margin: 12mm; }
}
.grid td:first-child { white-space: nowrap; }
.banner { background: #c00; color: #fff; font-weight: bold; text-align: center; padding: 5px 8px; letter-spacing: .3px; }
@media print { .banner { display: block !important; background: none; color: #c00; border: 2px solid #c00; -webkit-print-color-adjust: exact; } }

/* ---- batch 1: export / share / posting ---- */
.expbtns{display:inline-flex;gap:4px;flex-wrap:wrap}
.btn.wa,.wa,.btn.waboth,.btn.wagroup{background:#d9f7e3}
#watoast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#128c3e;color:#fff;padding:9px 16px;border-radius:4px;z-index:300;box-shadow:0 2px 8px rgba(0,0,0,.35);font-weight:bold;display:none}#watoast.bad{background:#a00}
#wabmodal .wbrow{display:flex;align-items:center;gap:6px;padding:5px 4px;border-bottom:1px solid #ddd;flex-wrap:wrap}
#wabmodal .wbrow .wbwho{flex:1;min-width:200px}
#wabmodal .wbst{font-size:11px;width:100%}
#wabmodal .wbok{color:#128c3e}#wabmodal .wbwarn{color:#a00}
#wabmodal .wbnext{outline:2px solid #128c3e}
.waico{color:#128c3e;font-weight:bold}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:200;align-items:center;justify-content:center}
.pendbadge{margin-left:auto;align-self:center;padding:1px 8px;color:#000;text-decoration:none}
.pendbadge b{background:#c00;color:#fff;border-radius:9px;padding:0 6px;margin-left:3px}
.pendbadge.zero b{background:#808080}
.retbadge{align-self:center;padding:1px 8px;color:#900;text-decoration:none;font-weight:bold}
.tag.ret{background:#ffd8a8;color:#7a3a00}
.tag.resub{background:#d8e8ff;color:#003070}
.tag.pst{background:#c8f0c8;color:#060}
.actions{display:flex;gap:4px;flex-wrap:wrap;margin:6px 0}
.actions form{display:inline}
.btn.danger,button.danger{color:#900}
.audit td{font-size:11px}
.notice{background:#fff3cd;border:1px solid #c9a227;padding:6px 8px;margin:6px 0}
fieldset.cb{margin:6px 0}
fieldset.cb .row label.w{width:120px}
td.chk{text-align:center;width:22px}
.row .btn,.row button,.expbtns .btn,.noprint .btn,.noprint button{vertical-align:middle;margin-top:0;margin-bottom:0}
.expbtns{align-items:center}

/* ---- batch 3/4 ---- */
table.form{border-collapse:collapse}
table.form th{text-align:right;font-weight:normal;padding:2px 8px 2px 0;white-space:nowrap;vertical-align:top}
table.form td{padding:2px 0}
#igrid input{width:100%;box-sizing:border-box}
#igrid select{max-width:100%}
#igrid small.oh{display:block;font-size:10px}
details summary{cursor:pointer;color:#036;margin:6px 0}
.mark{color:#b00000;font-weight:bold}
.vnav { display:inline-flex; align-items:center; gap:2px; margin:0 6px; }
.vnav .vbtn { padding:1px 6px; min-width:22px; text-align:center; font-size:12px; text-decoration:none; }
.vnav .vbtn.dis { color:#aaa; cursor:not-allowed; }
.vnav .vgo { width:58px; text-align:center; }

/* ---- round 15: invoice settlement ---- */
.invbtn{padding:1px 6px !important;font-size:11px !important;white-space:nowrap}
.invbtn.has{background:#d8f0d8;font-weight:bold}
.invsum{display:block;font-size:10px;color:#060;white-space:nowrap}
.invpick td{vertical-align:middle}
.invpick input.ipa{width:110px;text-align:right}
.st-unpaid{color:#a00000;font-weight:bold}.st-part{color:#a06000;font-weight:bold}.st-paid{color:#060;font-weight:bold}.st-treated{color:#555;font-style:italic}
.duesrc{font-size:10px;color:#777}
.print-page .st-unpaid,.print-page .st-part,.print-page .st-paid{color:#000}
.win:has(.ostable){max-width:1480px}
.ostable td{white-space:nowrap}
.ostable td.ref{white-space:normal;min-width:80px;max-width:180px}
.ostable td .duesrc{display:block;line-height:1}
.print-page .ostable td{font-size:10px;padding:1px 3px}
.ostable td:last-child{white-space:normal;min-width:70px}
/* ---- round 16: cheque books / register ---- */
.cqs{font-weight:bold}.cqs-unused{color:#060}.cqs-used{color:#0645ad}.cqs-cancelled{color:#a00000}.cqs-void{color:#a06000}
tr.cq-cancelled td,tr.cq-void td{text-decoration:none}
tr.cq-unused td{color:#555}
.chqmark{font-size:10px;font-weight:bold;white-space:nowrap;border:1px solid #888;padding:0 3px;border-radius:2px}
select.chq.has{background:#d8f0d8;font-weight:bold}
.chqtable td.ref,.chqreg td.ref{white-space:normal;min-width:80px;max-width:260px}
.print-page .cqs-unused,.print-page .cqs-used,.print-page .cqs-cancelled,.print-page .cqs-void,.print-page tr.cq-unused td{color:#000}

/* toolbar: Pending button with its count (last item, 09-Oct-2026) */
.toolbar .tbbadge { display:inline-block; min-width:16px; padding:0 5px; margin-left:3px; border-radius:9px; background:#c00; color:#fff; font-size:11px; text-align:center; line-height:16px; }
.toolbar .tbbadge.zero { background:#888; }
