* { box-sizing: border-box; margin: 0; }
:root {
  /* QuickBooks-style palette: dark slate sidebar, QB green actions */
  --sidebar: #141d2b; --sidebar-hi: #253449; --accent: #2ca01c; --accent-dk: #248a18;
  --bg: #f3f5f8; --card: #fff; --line: #e2e8f0; --text: #1e293b; --mut: #64748b;
  --green: #16a34a; --red: #dc2626; --amber: #d97706;
}

/* industry picker (company setup wizard) */
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.ind-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: pointer;
  font-family: inherit; transition: border-color .12s, box-shadow .12s, background .12s; }
.ind-tile:hover { border-color: var(--ia); }
.ind-tile.on { border-color: var(--ia); background: color-mix(in srgb, var(--ia) 9%, var(--card));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ia) 22%, transparent); }
.ind-tile .ico { font-size: 20px; line-height: 1.1; }
.ind-tile .lab { font-weight: 650; font-size: 13px; color: var(--text); }
.ind-tile .blurb { font-size: 11px; color: var(--mut); line-height: 1.3; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; border: 1.5px solid var(--line); white-space: nowrap; }

/* QuickBooks-style icon toolbar */
.toolbar { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; background: linear-gradient(#fdfefe, #eef1f5); border-bottom: 1px solid var(--line); padding: 2px 8px; position: sticky; top: 0; z-index: 5; }   /* p670: wraps, never scrolls */
.toolbar button { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; font-size: 10.5px; line-height: 1.15; color: #33445c; padding: 4px 6px; border: 0; background: none; cursor: pointer; border-radius: 6px; white-space: normal; max-width: 76px; text-align: center; font-family: inherit; }   /* p670: tight, labels wrap */
.toolbar button:hover { background: #dfe7f0; }
.toolbar button .ico { font-size: 19px; line-height: 1.1; }
.toolbar .tsep { width: 1px; background: var(--line); margin: 4px 6px; }
.toolbar .newbtn { flex-direction: row; gap: 6px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; padding: 0 16px; align-self: center; border-radius: 18px; height: 34px; }
.toolbar .newbtn:hover { background: var(--accent-dk); }
.navbadge { background: var(--red); color: #fff; border-radius: 9px; font-size: 10px; padding: 1px 7px; margin-left: 6px; font-weight: 700; }
.flagrow { background: #fff7ed; }
.flagrow.sev { background: #fef2f2; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 14px; }

/* layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: var(--sidebar); color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { padding: 16px; font-size: 17px; font-weight: 700; color: #fff; border-bottom: 1px solid #ffffff18; }
.logo span { color: #7eb3ff; }
.nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav a { display: block; padding: 9px 16px; color: #cbd5e1; font-weight: 500; border-left: 3px solid transparent; }
.nav a:hover { background: var(--sidebar-hi); color: #fff; }
.nav a.on { background: var(--sidebar-hi); color: #fff; border-left-color: var(--accent); }
.nav .sep { margin: 8px 16px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; }
.userbox { padding: 12px 16px; border-top: 1px solid #ffffff18; font-size: 12px; }
.userbox b { color: #fff; display: block; }
.main { flex: 1; min-width: 0; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 22px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 5; }
.topbar select { font-size: 15px; font-weight: 600; }
.content { padding: 22px; max-width: 1150px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.pagehead .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card .lbl { font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .5px; }
.card .val { font-size: 22px; font-weight: 700; margin-top: 4px; }
.card .sub { font-size: 12px; color: var(--mut); margin-top: 2px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 18px; }

/* tables */
table.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.grid th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--mut); padding: 9px 12px; border-bottom: 2px solid var(--line); background: #f8fafc; }
.grid td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.grid tr:last-child td { border-bottom: 0; }
.grid tr.click { cursor: pointer; } .grid tr.click:hover { background: #f1f5ff; }
.grid td.r, .grid th.r { text-align: right; font-variant-numeric: tabular-nums; }
.grid td.b { font-weight: 700; }
.neg { color: var(--red); }
/* section heading used inside pages and modals (the nav has its own, more specific, rule) */
.sep { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .8px;
  font-weight: 700; color: var(--mut); border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.sep .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge.paid { background: #dcfce7; color: #15803d; }
.badge.open, .badge.unpaid { background: #dbeafe; color: #1d4ed8; }
.badge.partial { background: #fef3c7; color: #b45309; }
.badge.overdue { background: #fee2e2; color: #b91c1c; }
.badge.void { background: #e2e8f0; color: #475569; }
.badge.draft { background: #ede9fe; color: #5b21b6; }   /* p787 */
.badge.printed { background: #dcfce7; color: #15803d; }
.badge.toprint { background: #fef3c7; color: #b45309; }

/* forms */
label.f { display: block; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; color: #475569; }
label.f > input, label.f > select, label.f > textarea { margin-top: 3px; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #93c5fd; border-color: var(--accent); }
.row { display: flex; gap: 12px; } .row > * { flex: 1; min-width: 0; }
/* p758: chips in a wrapping row keep their own width (the .row > * { flex:1 } rule is for form fields, not button lists) */
.row[style*="flex-wrap"] > .btn, .row[style*="flex-wrap"] > a.btn, .row[style*="flex-wrap"] > .chk, .row[style*="flex-wrap"] > label.chk { flex: 0 0 auto; min-width: 0; }
/* p894: any row of buttons (tab strips, action rows) wraps and keeps each button at its own width; 22 tabs squeezed to 42 px each is not a row anyone can read */
.row:has(> .btn), .row:has(> a.btn) { flex-wrap: wrap; } .row > .btn, .row > a.btn { flex: 0 0 auto; min-width: 0; }
.btn { display: inline-block; padding: 8px 15px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f1f5f9; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: var(--accent-dk); }
.btn.danger { color: var(--red); border-color: #fca5a5; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.err { background: #fee2e2; color: #b91c1c; padding: 9px 12px; border-radius: 8px; margin: 10px 0; font-size: 13px; }
.ok { background: #dcfce7; color: #15803d; padding: 9px 12px; border-radius: 8px; margin: 10px 0; font-size: 13px; }
.hint { color: var(--mut); font-size: 12.5px; }

/* login */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e2a3a, #2c3e54); }
.loginbox { background: #fff; border-radius: 14px; padding: 34px; width: 380px; box-shadow: 0 20px 60px #0006; }
.loginbox h1 { margin-bottom: 4px; } .loginbox .hint { margin-bottom: 18px; }

/* modal */
#modal-root:not(:empty) { position: fixed; inset: 0; background: #0f172a99; z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 16px; }
.modal { background: #fff; border-radius: 12px; padding: 22px; width: 100%; max-width: 640px; box-shadow: 0 24px 70px #0007; }
.modal.wide { max-width: 900px; }
.modal h2 { margin-bottom: 14px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.itemtbl { width: 100%; border-collapse: collapse; margin: 8px 0; }
.itemtbl th { font-size: 11.5px; color: var(--mut); text-align: left; padding: 3px 5px; }
.itemtbl td { padding: 3px 5px; vertical-align: top; }
.itemtbl input, .itemtbl select { padding: 5px 7px; }
.totline { text-align: right; font-size: 15px; margin: 6px 4px; }
.totline b { font-size: 17px; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid var(--line); }
.tabs a { padding: 8px 16px; font-weight: 600; color: var(--mut); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* report display */
.report { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px 30px; }
.report h2 { text-align: center; } .report .rsub { text-align: center; color: var(--mut); margin-bottom: 14px; }
.report table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.report caption { text-align: left; font-weight: 700; padding: 6px 0; font-size: 14px; }
.report th { text-align: left; border-bottom: 2px solid #334155; padding: 5px 8px; font-size: 12.5px; }
.report td { padding: 4px 8px; border-bottom: 1px solid #eef2f7; white-space: pre-wrap; }
.report .r { text-align: right; font-variant-numeric: tabular-nums; }
.report .b { font-weight: 700; }

/* print */
#print-area { display: none; }
@media print {
  body > #root, body > #modal-root { display: none !important; }
  #print-area { display: block; }
  body { background: #fff; }
  @page { margin: 0.5in; }
  .prn-report h2 { text-align: center; margin: 0; } .prn-report .rsub { text-align: center; color: #444; margin-bottom: 12px; }
  .prn-report table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12px; }
  .prn-report th { text-align: left; border-bottom: 2px solid #000; padding: 4px 6px; }
  .prn-report td { padding: 3px 6px; border-bottom: 1px solid #ddd; white-space: pre-wrap; }
  .prn-report .r { text-align: right; } .prn-report .b { font-weight: 700; }
  /* invoice */
  .prn-inv { font-size: 13px; }
  .prn-inv .head { display: flex; justify-content: space-between; margin-bottom: 26px; }
  .prn-inv h1 { font-size: 26px; letter-spacing: 2px; }
  .prn-inv table { width: 100%; border-collapse: collapse; margin: 16px 0; }
  .prn-inv th { background: #eee; text-align: left; padding: 6px 8px; border-bottom: 2px solid #000; }
  .prn-inv td { padding: 6px 8px; border-bottom: 1px solid #ccc; }
  .prn-inv .r { text-align: right; }
  .prn-inv .totals { width: 280px; margin-left: auto; }
  /* checks: standard voucher stock — check on top 3.5", two stubs below */
  .prn-check { page-break-after: always; position: relative; width: 7.5in; height: 10in; font-size: 12px; }
  .prn-check .zone { position: absolute; left: 0; width: 100%; }
  .prn-check .chk { top: 0; height: 3in; }
  .prn-check .stub1 { top: 3.2in; height: 3.1in; border-top: 1px dashed #999; padding-top: .15in; }
  .prn-check .stub2 { top: 6.5in; height: 3.1in; border-top: 1px dashed #999; padding-top: .15in; }
  .prn-check .date { position: absolute; top: .45in; right: .3in; }
  .prn-check .payee { position: absolute; top: 1.02in; left: .75in; max-width: 4.8in; }
  .prn-check .amtnum { position: absolute; top: 1.02in; right: .25in; font-weight: 700; }
  .prn-check .amtwords { position: absolute; top: 1.5in; left: .15in; width: 6.6in; border-bottom: 1px solid #0000; }
  .prn-check .memo { position: absolute; top: 2.35in; left: .55in; max-width: 3.6in; }
  .prn-check .stubtbl { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: .12in; }
  .prn-check .stubtbl td, .prn-check .stubtbl th { padding: 2px 6px; text-align: left; }
  .prn-check .stubtbl .r { text-align: right; }
}

/* Bulk edit grid: a selected row has to be obvious at a glance when you are about to change 400 of them. */
.grid tr.sel > td { background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* VERSIONTEST marker */
.versiontest-canary { color: red; }

/* VERSIONTEST marker */
.versiontest-canary { color: red; }

/* VERSIONTEST marker */
.versiontest-canary { color: red; }

/* ---------- phones: the product had ONE media query and it was @media print. Field trades do their
   highest-value work standing outside; this is the difference between installs-as-a-PWA and usable on
   a driveway. Deliberately a baseline: stack the shell, wrap the rows, let tables scroll. ---------- */
.mburger { display: none; }
.navback { display: none; }
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  /* the sidebar becomes an off-canvas drawer: hidden left, slides in on ☰ */
  .sidebar { position: fixed; top: 0; bottom: 0; left: -290px; width: 268px; height: 100dvh;
    z-index: 60; transition: left .18s ease-out; overflow-y: auto; box-shadow: none; }
  body.navopen .sidebar { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.45); }
  body.navopen .navback { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10,16,28,.5); }
  .mburger { display: flex; align-items: center; justify-content: center; position: fixed;
    left: 14px; bottom: 18px; z-index: 65; width: 52px; height: 52px; border-radius: 50%;
    background: var(--sidebar); color: #fff; border: 1px solid var(--sidebar-hi); font-size: 22px;
    box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; }
  .main { width: 100%; }
  .content { padding: 12px; max-width: 100%; }
  .topbar { padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .topbar select { max-width: 100% !important; width: 100%; }
  .pagehead h1 { font-size: 20px; }
  .row { flex-wrap: wrap; }
  .row > * { min-width: 140px; }
  /* p894: nothing may run past the right edge of a phone. Long buttons wrap, inline flex rows wrap, wide labels and file pickers shrink. */
  .btn { white-space: normal; max-width: 100%; }
  .content div[style*="display:flex"]:not([style*="flex-direction:column"]):not([style*="flex-wrap"]) { flex-wrap: wrap; }
  .content label.f { min-width: 0 !important; max-width: 100%; }
  .content input[type=file], .content input, .content select, .content textarea { max-width: 100%; }
  table.grid { display: block; overflow-x: auto; white-space: nowrap; }
  .modal { max-width: calc(100vw - 24px); padding: 14px; }
  #modal-root:not(:empty) { padding: 16px 8px; }
}

/* p659: touch targets. body.touch = the device preference (Auto = coarse pointer); .touchy = counter screens, always. */
body.touch .btn, .touchy .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; font-size: 15px; border-radius: 10px; }
body.touch .btn.sm, .touchy .btn.sm { min-height: 40px; padding: 7px 14px; font-size: 14px; }
body.touch .toolbar button { min-height: 54px; padding: 6px 16px; font-size: 12px; }
body.touch .toolbar button .ico { font-size: 22px; }
body.touch .toolbar .newbtn { height: 42px; padding: 0 20px; }
body.touch input:not([type=checkbox]):not([type=radio]), body.touch select, body.touch textarea,
.touchy input:not([type=checkbox]):not([type=radio]), .touchy select { min-height: 44px; padding: 10px 12px; font-size: 16px; }
body.touch input[type=checkbox], body.touch input[type=radio], .touchy input[type=checkbox], .touchy input[type=radio] { width: 22px; height: 22px; }
body.touch .grid td, body.touch .grid th, .touchy .grid td { padding: 11px 10px; }
body.touch .nav a { padding: 12px 16px; font-size: 15px; }
body.touch .topbar select { min-height: 44px; }
.touchy .card[onclick] { min-height: 92px; }
.touchy .pagehead .actions { gap: 8px; flex-wrap: wrap; }

/* p667: + New menu, split buttons, More menus, ribbon company switcher */
.newmenu { position: fixed; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px #0004; padding: 6px 0; min-width: 220px; max-height: 80vh; overflow-y: auto; }
.newmenu .sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--mut); padding: 8px 14px 3px; }
.newmenu a { display: block; padding: 8px 16px; color: inherit; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.newmenu a:hover { background: #f1f5f9; }
.splitbtn { position: relative; display: inline-flex; }
.splitbtn > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.splitbtn > .btn.arrow { border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 8px; padding-right: 8px; margin-left: -1px; border-left: 1px solid #ffffff55; }
.splitbtn .menu { display: none; position: absolute; right: 0; bottom: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 30px #0003; min-width: 190px; padding: 4px 0; z-index: 60; text-align: left; }
.splitbtn.open .menu { display: block; }
.splitbtn .menu a { display: block; padding: 8px 14px; color: inherit; text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap; }
.splitbtn .menu a:hover { background: #f1f5f9; }
.splitbtn .menu a.danger { color: var(--red); }
.toolbar .cosel { align-self: center; max-width: 220px; width: auto; font-weight: 700; font-size: 13px; padding: 6px 8px; margin: 0 4px 0 2px; border-radius: 8px; }
body.touch .toolbar .cosel { min-height: 44px; font-size: 15px; }

/* p668: status tabs with counts, batch-action bar */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 10px; }
.tabs a { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 600; font-size: 13px; background: #fff; }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs a .n { opacity: .7; margin-left: 6px; font-weight: 500; }
.batchbar { display: flex; gap: 8px; align-items: center; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; flex-wrap: wrap; }
.touchy .tabs a, body.touch .tabs a { padding: 10px 16px; font-size: 14px; }

/* p669: full-height transaction sheets + the phone bottom bar */
#modal-root:has(.sheet) { padding: 12px 16px; align-items: stretch; }
.modal.sheet { max-width: 1100px; margin: 0 auto; min-height: calc(100vh - 24px); display: flex; flex-direction: column; padding: 22px 26px 0; }
.modal.sheet > .foot { position: sticky; bottom: 0; background: #fff; padding: 12px 0 14px; margin: auto 0 0; border-top: 1px solid var(--line); z-index: 2; }
.modal.sheet > .foot:not(:last-child) { position: static; }
.mobilebar { display: none; }
@media (max-width: 760px) {
  .mburger { display: none !important; }
  .mobilebar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 58px; z-index: 64; background: var(--sidebar); border-top: 1px solid var(--sidebar-hi); padding-bottom: env(safe-area-inset-bottom); }
  .mobilebar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: none; border: 0; color: #cbd5e1; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
  .mobilebar button .ico { font-size: 20px; line-height: 1.1; }
  .mobilebar button.plus { flex: 0 0 72px; background: var(--accent); color: #fff; font-size: 30px; border-radius: 18px; margin: 6px 4px; }
  .content { padding-bottom: 76px; }
  #modal-root:has(.sheet) { padding: 8px; }
  .modal.sheet { min-height: calc(100dvh - 16px); padding: 14px 14px 0; }
}

/* p670: ribbon extras */
.toolbar .tsep { margin: 5px 3px; }
.toolbar .newbtn { max-width: none; white-space: nowrap; }
.toolbar .ribbon-more { align-self: center; font-size: 18px; padding: 2px 8px; color: var(--mut); max-width: none; margin-left: auto; }
.toolbar .ribbon-more:hover { color: inherit; }
body.touch .toolbar button { max-width: 92px; }
/* p895: the phone toolbar is one row; the rest of it is a menu behind \2630 */
.toolbar .rb-menu-btn { display: none; }
.rb-pop { position: fixed; z-index: 70; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 6px; max-height: 70vh; overflow-y: auto; min-width: 220px; max-width: calc(100vw - 16px); }
.rb-pop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); border-radius: 8px; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.rb-pop button:active { background: var(--panel2, #eef1f5); }
.rb-pop .ico { font-size: 20px; width: 26px; text-align: center; }
.rb-pop .rb-sep { height: 1px; background: var(--line); margin: 4px 8px; }
@media (max-width: 760px) {
  .toolbar { flex-wrap: nowrap; overflow: hidden; align-items: center; }
  .toolbar .rb-hid, .toolbar .ribbon-more { display: none !important; }
  .toolbar .rb-menu-btn { display: flex; flex: 0 0 auto; margin-left: auto; font-size: 20px; padding: 6px 10px; max-width: none; position: relative; }
  .toolbar .rb-menu-btn.rb-dot::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red, #d33); }
  .toolbar .cosel { max-width: 128px; }
  .toolbar .newbtn, .toolbar .newbtn + .tsep { display: none; }   /* the bottom bar's + does the same job; the room goes to two more buttons */
  .toolbar button { flex: 0 0 auto; }
}
/* p673: chart of accounts */
.pagehead .actions input[type=text], .pagehead .actions input:not([type]) { width: auto; }

/* p758: the grouped page picker (Command Deck wheel slots, Workbench rail) */
.hm-pick input { margin-bottom: 10px; }
.hm-pick h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #64748b); }
.hm-pick .g { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.hm-pick .g button { display: flex; align-items: center; gap: 9px; text-align: left; padding: 9px 11px; white-space: normal; line-height: 1.25; font-weight: 600; }
.hm-pick .g button .e { font-size: 18px; flex: 0 0 auto; }
.hm-pick .g button[hidden], .hm-pick section[hidden] { display: none; }
.hm-pick .none { color: var(--muted, #64748b); padding: 8px 0; }
/* p773: dashboard charts */
.chart-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 20px; }
.chart { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 140px; }
.chart .chart-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chart h3 { margin: 0; font-size: 14px; }
.chart .big { font-size: 22px; font-weight: 800; margin-top: 2px; }
.chart .sub { font-size: 12px; color: var(--muted, #64748b); }
.chart .up { color: var(--green, #16a34a); } .chart .down { color: var(--red, #dc2626); }
.chart svg { width: 100%; height: auto; display: block; margin-top: 6px; color: var(--fg, #1e293b); }
.chart .leg { display: flex; gap: 14px; font-size: 11px; color: var(--muted, #64748b); margin-top: 2px; }
.chart .leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.chart .asof { font-size: 11px; color: var(--muted, #64748b); margin-top: 6px; }
/* ---------- p745: dark + night skins (my account -> Look) ---------- */
:root[data-theme="dark"], :root[data-theme="night"] { color-scheme: dark; }
:root[data-theme="dark"] { --bg: #121212; --card: #1e1e1e; --line: #2f3338; --text: #e4e6e8; --mut: #9aa3ab; --sidebar: #0e1117; --sidebar-hi: #1c2430; --accent: #43b35b; --accent-dk: #3aa04f; --green: #5fc98a; --red: #e07a6a; --amber: #d9a441; }
:root[data-theme="night"] { --bg: #0c0b09; --card: #161411; --line: #2a2621; --text: #d9cfc0; --mut: #8d8273; --sidebar: #0a0907; --sidebar-hi: #1d1a16; --accent: #b8903f; --accent-dk: #a07d36; --green: #8fb573; --red: #c87a5a; --amber: #c99a56; }
:root[data-theme="dark"] .toolbar, :root[data-theme="night"] .toolbar { background: var(--card); }
:root[data-theme="dark"] .toolbar button, :root[data-theme="night"] .toolbar button { color: var(--text); }
:root[data-theme="dark"] .toolbar button:hover, :root[data-theme="night"] .toolbar button:hover { background: var(--sidebar-hi); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea, :root[data-theme="night"] input, :root[data-theme="night"] select, :root[data-theme="night"] textarea { background: var(--card); color: var(--text); border-color: var(--line); }
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .modal, :root[data-theme="dark"] .card, :root[data-theme="dark"] .report, :root[data-theme="dark"] .newmenu, :root[data-theme="dark"] .loginbox,
:root[data-theme="night"] .panel, :root[data-theme="night"] .modal, :root[data-theme="night"] .card, :root[data-theme="night"] .report, :root[data-theme="night"] .newmenu, :root[data-theme="night"] .loginbox { background: var(--card); color: var(--text); border-color: var(--line); }
:root[data-theme="dark"] th, :root[data-theme="night"] th { background: var(--sidebar-hi); color: var(--text); }
:root[data-theme="dark"] td, :root[data-theme="night"] td { border-color: var(--line); }
:root[data-theme="dark"] .tabs button, :root[data-theme="night"] .tabs button { color: var(--text); }
:root[data-theme="dark"] .btn, :root[data-theme="night"] .btn { background: var(--card); color: var(--text); border-color: var(--line); }
:root[data-theme="dark"] .btn.pri, :root[data-theme="night"] .btn.pri { background: var(--accent); color: #fff; border-color: var(--accent); }
:root[data-theme="dark"] .hint, :root[data-theme="night"] .hint { color: var(--mut); }
:root[data-theme="dark"] .ok, :root[data-theme="night"] .ok { background: transparent; color: var(--green); }
:root[data-theme="dark"] .err, :root[data-theme="night"] .err { background: transparent; color: var(--red); }
:root[data-theme="dark"] .mobilebar, :root[data-theme="night"] .mobilebar { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .mobilebar button, :root[data-theme="night"] .mobilebar button { color: var(--text); }

/* p827: till item tiles */
.tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:4px;min-height:58px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel,#fff);color:inherit;text-align:left;cursor:pointer;position:relative;font:inherit}
.tile:hover{border-color:var(--accent)}
.tile.off{opacity:.45;text-decoration:line-through}
.tile.key{border-color:#d9a400}
.tile-n{font-weight:600;font-size:13px;line-height:1.15;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tile-p{font-size:12px;color:var(--muted,#667)}
.tile-k{position:absolute;top:3px;right:6px;color:#d9a400;font-size:12px}

/* p835: dispatch board */
.jweek th{vertical-align:top;text-align:left;font-weight:600}.jweek th.today{background:var(--panel2,#eef4ff)}.jcell{vertical-align:top;min-width:120px;height:64px;padding:4px}.jcell.over{outline:2px dashed var(--accent);outline-offset:-2px}.jcell.heavy{background:#fff6e5}.jcell.lane{background:var(--panel2,#f6f7f9)}
.jcard{border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:6px;padding:4px 6px;margin:0 0 4px;background:var(--panel,#fff);cursor:grab;font-size:12px}.jcard.live{border-left-color:var(--green,#3a8)}.jcard.hot{border-left-color:var(--red,#c33)}.jc-t{white-space:nowrap}.jc-c{color:var(--muted,#667);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}

/* p880: a secret that is not a sign-in: masked text, so the browser's password manager leaves it alone */
.secret{-webkit-text-security:disc}
