/* My Company — Stage 1 shell styles. QuickBooks Online-flavoured:
   charcoal sidebar, green primary (#2ca01c), white cards, soft shadows. */
:root {
  --green: #2ca01c;
  --green-dark: #12540a;
  --ink: #393a3d;
  --line: #e3e6ea;
  --muted: #6b7178;
  --red: #c5221f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #212124; background: #f4f5f8; }
[hidden] { display: none !important; }
h1 { font-size: 22px; margin: 8px 0; }
h2 { font-size: 18px; }
.muted { color: var(--muted); }
.err { color: var(--red); min-height: 1em; }
.spacer { flex: 1; }
hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }

.btn { background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 6px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: #fff; color: var(--ink); border-color: #c9cdd2; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- sign-in ---------- */
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.signin-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 14px rgba(0,0,0,.10); padding: 28px; width: 360px; max-width: 100%; text-align: center; }
.signin-card form { text-align: left; }
.signin-card label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.signin-card input { width: 100%; padding: 8px 10px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; margin-top: 4px; }
.signin-card form .btn { margin-top: 14px; }
.logo-lg { display: flex; justify-content: center; }

/* ---------- office shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 216px; background: var(--ink); color: #fff; padding: 14px 10px; flex: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; padding: 4px 6px 14px; }
.sidebar nav { display: grid; gap: 2px; }
.nav-item { color: #e8eaed; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.nav-grip { flex: 0 0 auto; display: inline-flex; align-items: center; line-height: 0; cursor: grab; }
.nav-grip svg { display: block; fill: rgba(255,255,255,.42); }
.nav-item:hover .nav-grip svg { fill: rgba(255,255,255,.78); }
.nav-item.active .nav-grip svg { fill: rgba(255,255,255,.68); }
.nav-item.dragging .nav-grip { cursor: grabbing; }
.nav-item.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.topbar-title { font-weight: 600; font-size: 16px; }
.content { padding: 16px; }
.toolbar { margin-bottom: 12px; }
.toolbar input[type="date"] { padding: 6px 8px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }

/* ---------- day board + tiles ---------- */
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.day-col { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 10px; min-width: 210px; flex: 1 1 0; }
.day-col h3 { margin: 2px 0 10px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.day-col .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.day-col .count { color: var(--muted); font-weight: 400; }
.tile { border: 1px solid var(--line); border-left-width: 5px; border-radius: 8px; padding: 7px 9px; margin-bottom: 7px; background: #fcfcfd; }
.tile-cust { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-addr { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.done-mark { color: #137333; font-weight: 700; }
.skipped-mark { color: var(--red); font-weight: 800; font-size: 12px; }
.empty { background: #fff; border: 1px dashed #c9cdd2; border-radius: 10px; padding: 26px; color: var(--muted); text-align: center; width: 100%; }

/* ---------- crew ---------- */
.crew-wrap { max-width: 560px; margin: 0 auto; }
.crew-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 12px; margin-bottom: 10px; }
.crew-card .tile-addr { white-space: normal; font-size: 13.5px; }
.crew-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.status { color: var(--muted); font-size: 13px; }
.crew-chip { background: var(--green); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.crew-strip { display: flex; gap: 4px; margin: 2px 0 10px; }
.crew-strip button { flex: 1 1 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 5px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; color: inherit; }
.crew-strip .cs-dow { font-size: 11px; font-weight: 700; color: var(--muted); }
.crew-strip .cs-day { width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; font-weight: 600; font-size: 13.5px; }
.crew-strip button.today .cs-day { background: var(--green); color: #fff; }
.crew-strip button.sel { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
/* Crew Day-view job cards (Jobber layout) */
.crew-tile { background: #fff; border-left-width: 10px; border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.crew-tile .cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.crew-tile .cc-title { font-weight: 700; font-size: 15px; }
.crew-tile .cc-check { color: #137333; font-weight: 800; font-size: 16px; flex: 0 0 auto; }
.crew-tile .cc-time { margin-top: 2px; font-size: 13.5px; }
.crew-tile .cc-addr { color: var(--muted); font-size: 13px; }
.crew-tile .cc-notes { color: var(--muted); font-size: 13px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#crew-board .crew-tile.is-done { background: #edeff1; opacity: 1; }
#crew-board .tile.is-done .tile-cust, #crew-board .tile.is-done .tile-title,
#crew-board .tile.is-done .tile-addr, #crew-board .tile.is-done .tile-meta,
#crew-board .crew-tile.is-done .cc-title, #crew-board .crew-tile.is-done .cc-time,
#crew-board .crew-tile.is-done .cc-addr, #crew-board .crew-tile.is-done .cc-notes,
#crew-board .crew-tile.is-done .tile-meta { text-decoration: line-through; }
.crew-band { height: 6px; border-radius: 3px; margin: -6px 0 12px; }

/* ---------- Stage 1 Schedule build (office + crew) ---------- */
.toolbar.wrap { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.tgroup { display: flex; gap: 6px; align-items: center; }
.tgroup label { font-size: 13px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
#view-btns .btn.on, #crew-view-btns .btn.on { background: var(--green); color: #fff; border-color: var(--green); }
.menu-wrap { position: relative; }
.menu { position: absolute; top: 110%; left: 0; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.13); padding: 8px 10px; min-width: 190px; }
.menu label { display: block; padding: 3px 0; color: #212124; font-size: 13.5px; }
.menu-clear { font-size: 12.5px; }
.board-wrap { min-height: 200px; }
.cols-row .day-col { min-width: 190px; }
.col-group { margin-bottom: 10px; }
.col-group-h { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 6px 0 4px; }
.col-group-h .dot { width: 9px; height: 9px; border-radius: 50%; }
.tile { cursor: pointer; }
.tile.is-done { opacity: .62; }
.tile.is-skipped { border-color: var(--red) !important; opacity: .75; }
.tile-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.stamp { color: #137333; border: 1.5px solid #137333; border-radius: 4px; font-size: 10.5px; font-weight: 800; padding: 0 4px; letter-spacing: .4px; }
.pill { background: #eef1f4; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
.pill-red { background: #fdecea; color: var(--red); }
.pill-blue { background: #e8f0fe; color: #1a56c4; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; align-items: center; }
.route-row { margin: 2px 0 8px; display: flex; gap: 6px; }
.drop-on { outline: 2px dashed var(--green); outline-offset: -4px; }
.month-head { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.m-dow { font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; }
.m-cell { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 74px; padding: 6px; cursor: pointer; }
.m-cell.blank { background: transparent; border: none; cursor: default; }
.m-cell.today { border-color: var(--green); border-width: 2px; }
.m-day { font-weight: 700; font-size: 13px; }
.m-count { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 14px; margin-bottom: 14px; }
.card h2 { margin-top: 0; }
.team-card h3 { display: flex; gap: 7px; align-items: center; margin: 2px 0 10px; font-size: 15px; }
.team-card .dot, .team-row .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.team-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { padding: 7px 9px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }
.inline-form input[type="color"] { padding: 2px; width: 42px; height: 32px; }

/* ---------- modal / popups / editor ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(20,22,25,.48); z-index: 100; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 22px 12px; }
.modal { background: #fff; border-radius: 12px; box-shadow: 0 8px 34px rgba(0,0,0,.25); padding: 20px; width: 640px; max-width: 100%; }
.modal h2 { margin: 0 0 6px; font-size: 19px; }
.modal h3 { margin: 16px 0 6px; font-size: 14px; }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.btn.danger { background: #fff; color: var(--red); border-color: var(--red); }
.kv { margin: 3px 0; }
.note-box { background: #f7f8fa; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; white-space: pre-wrap; }
.crew-note-box { background: #fff8e1; border-color: #f0dfa0; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #c9cdd2; border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 13.5px; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip-x { border: none; background: none; font-size: 15px; cursor: pointer; color: var(--muted); padding: 0 2px; }
.chip-add { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #c9cdd2; background: #fff; font-size: 17px; cursor: pointer; line-height: 1; }
.saved-ok { color: #137333; font-weight: 700; font-size: 13.5px; }
#jd-team-menu { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.line-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.line-name { font-weight: 600; }
.line-total { font-weight: 700; margin-top: 8px; }
.photo-row { display: flex; gap: 9px; flex-wrap: wrap; }
.photo-cell { position: relative; display: inline-block; }
.photo-cell img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #eef1f4; }
.photo-cell .btn { position: absolute; top: 3px; right: 3px; padding: 0 6px; }
.stack { display: grid; gap: 8px; margin-top: 12px; }
.form-grid { display: grid; gap: 10px; }
.form-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form-grid label.chk { display: flex; gap: 7px; align-items: center; color: #212124; font-size: 14px; }
.form-grid input, .form-grid select, .form-grid textarea { padding: 8px 10px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; color: #212124; }
.je-teams { border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.je-teams legend { font-size: 12.5px; color: var(--muted); padding: 0 5px; }
.je-line { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.je-line-top { display: grid; grid-template-columns: 1fr 64px 96px 76px 30px; gap: 6px; align-items: center; }
.je-line input, .je-line textarea { padding: 7px 8px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 13.5px; width: 100%; }
.je-line textarea { margin-top: 6px; }
.je-t { font-weight: 600; text-align: right; }
/* ---------- monthly billing run dialog ---------- */
.mi-cust { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.mi-cust-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.mi-cust-h .count { color: var(--muted); font-weight: 400; font-size: 13px; }
.mi-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.mi-line:last-child { border-bottom: none; }
.modal input[type="month"] { padding: 8px 10px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }

.crew-wrap .tile { margin-bottom: 8px; }
#crew-board .board { padding-bottom: 8px; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #202124; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 200; box-shadow: 0 4px 18px rgba(0,0,0,.3); font-size: 14px; max-width: 92vw; text-align: center; }
.install-hint { font-size: 13px; margin-top: 14px; }
.modal textarea { width: 100%; padding: 8px 10px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }

/* ---------- Stage 2: customers / documents / items / vendors ---------- */
.toolbar input[type="search"], .toolbar select { padding: 6px 8px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .4px; color: var(--muted); padding: 8px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .num { text-align: right; }
.tbl th.num { text-align: right; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover { background: #f7f9fc; }
.tbl th.clickable { cursor: pointer; }
.linkbtn { background: none; border: none; color: #1a56c4; cursor: pointer; font-size: 13.5px; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.selbar { margin: 2px 0 8px; font-size: 13.5px; }
.dd-wrap { position: relative; display: inline-block; }
.dd-menu { position: absolute; right: 0; top: 110%; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 190px; padding: 4px 0; text-align: left; }
.dd-menu button { display: block; width: 100%; background: none; border: none; text-align: left; padding: 7px 12px; font-size: 14px; cursor: pointer; color: #212124; }
.dd-menu button:hover { background: #f2f5f9; }
.dd-menu button.danger { color: var(--red); }
.tag-red { background: #fdecea; color: var(--red); border-radius: 4px; font-size: 10.5px; font-weight: 800; padding: 1px 5px; letter-spacing: .4px; }
.ok { color: #137333; font-weight: 600; }
.bad { color: var(--red); font-weight: 600; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 19px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cp-grid { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .cp-grid { grid-template-columns: 1fr; } }
.cp-rail input { padding: 7px 9px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; margin-bottom: 8px; }
.cp-rail-item { padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.cp-rail-item:hover { background: #f7f9fc; }
.cp-rail-item.on { background: #eef3fa; }
.cp-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.fin-row { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0 2px; }
.fin-row .fin b { display: block; font-size: 17px; }
.fin-row .fin span { font-size: 12.5px; color: var(--muted); }
.ptabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 12px 0; flex-wrap: wrap; }
.ptabs button { background: none; border: none; padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.ptabs button.on { color: #212124; font-weight: 600; border-bottom-color: var(--green); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 22px; }
.kv-grid .kv b { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.de-line { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.de-line-top { display: grid; grid-template-columns: 1fr 64px 96px 76px 30px; gap: 6px; align-items: center; }
.de-line input, .de-line textarea { padding: 7px 8px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 13.5px; width: 100%; }
.de-line textarea { margin-top: 6px; }
.de-t { font-weight: 600; text-align: right; }
.doc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.doc-head .co-name { font-size: 19px; font-weight: 700; }
.doc-wrap { position: relative; }
.doc-wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 5; overflow: hidden; }
.doc-wm span { transform: rotate(-22deg); font-size: 64px; font-weight: 800; color: rgba(200,0,0,.12); white-space: nowrap; }

/* ---------- printing (documents + lists) ---------- */
#print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; inset: 0; padding: 18px; }
  #print-area .tbl th, #print-area .tbl td { border-bottom: 1px solid #bbb; }
}
.print-doc { position: relative; font-size: 14px; color: #000; }
.print-wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; }
.print-wm span { transform: rotate(-22deg); font-size: 74px; font-weight: 800; color: rgba(200,0,0,.14); white-space: nowrap; }
.print-head { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #999; padding-bottom: 10px; margin-bottom: 12px; }
.print-co { font-size: 20px; font-weight: 700; }
.print-tot { text-align: right; margin-top: 10px; display: grid; gap: 3px; }
.print-notes { white-space: pre-wrap; margin-top: 14px; }

/* ---------- Stage 3: books (dashboard, banking, statements, reports, accounts, assets) ---------- */
.pos { color: #137333; }
.neg { color: var(--red); }
.link { background: none; border: none; color: #1a56c4; cursor: pointer; font-size: inherit; padding: 0; }
.link:hover { text-decoration: underline; }
.grid { display: grid; gap: 14px; }
.grid.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.kpi .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.kpi .val { font-size: 24px; font-weight: 700; margin: 4px 0 2px; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 110px; }
.bars .m { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bars .pair { display: flex; gap: 2px; align-items: flex-end; height: 88px; }
.bars .b { width: 9px; border-radius: 2px 2px 0 0; min-height: 1px; }
.bars .b.in { background: #3fa98f; }
.bars .b.out { background: #d27b5f; }
.bars .t { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.toolbar .grow { flex: 1; }
.tablewrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); padding: 6px 10px; }
.tbl td.n, .tbl th.n { text-align: right; }
.tbl tr.editing { background: #fffbe8; }
.tbl input, .tbl select { padding: 5px 7px; border: 1px solid #c9cdd2; border-radius: 5px; font-size: 13.5px; }
.tbl .pill.Income { background: #e3f4ec; color: #0b6b4a; }
.tbl .pill.Expense { background: #eef1f4; color: #393a3d; }
.tbl .pill.Owner { background: #e8f0fe; color: #1a56c4; }
.tbl .pill.Asset { background: #f3e8fd; color: #681da8; }
.tbl .pill.Liability { background: #fdecea; color: #a50e0e; }
.tbl .pill.Transfer { background: #fef7e0; color: #b06000; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.fgrid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fgrid input, .fgrid select, .fgrid textarea { padding: 8px 10px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; color: #212124; width: 100%; }
.fgrid .w3 { grid-column: span 1; }
.seg { display: flex; gap: 6px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 8px; border: 1px solid #c9cdd2; background: #fff; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.seg button.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.bkdd { position: relative; display: inline-block; }
.bkdd-menu { position: absolute; right: 0; top: 110%; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 220px; padding: 4px 0; }
.bkdd-menu button { display: block; width: 100%; background: none; border: none; text-align: left; padding: 8px 12px; font-size: 14px; cursor: pointer; color: #212124; }
.bkdd-menu button:hover { background: #f2f5f9; }
.modal.wide { width: 980px; }
.modal.xwide { width: 1240px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: none; border: none; padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs button.on { color: #212124; font-weight: 600; border-bottom-color: var(--green); }
.report { max-width: 860px; }
.report.wide { max-width: none; }
.report .rh { text-align: center; margin-bottom: 12px; }
.report .rh b { font-size: 18px; }
.report table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report th, .report td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.report td.n, .report th.n { text-align: right; }
.report td.ind { padding-left: 22px; }
.report tr.sec td { font-weight: 700; background: #f7f8fa; }
.report tr.tot td { font-weight: 700; border-top: 1px solid #9aa0a6; }
.report tr.grand td { font-weight: 800; border-top: 2px solid #393a3d; font-size: 15px; }
.repnotes { background: #fef7e0; border: 1px solid #f0dfa0; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin-top: 14px; max-width: 860px; }
.stgrid { border-collapse: collapse; font-size: 13px; }
.stgrid th, .stgrid td { border: 1px solid var(--line); padding: 6px 7px; text-align: center; }
.stgrid td.y { font-weight: 700; background: #f7f8fa; }
.stgrid .ok { color: #137333; font-weight: 600; }
.stgrid .miss { color: var(--red); font-weight: 600; font-size: 12px; }
.stgrid .na { color: #c9cdd2; }
.stlink { font-size: 12.5px; white-space: nowrap; }
.kv2 { display: grid; grid-template-columns: 170px 1fr; gap: 5px 12px; font-size: 14px; }
.kv2 .k { color: var(--muted); }
.imp tr.dup { opacity: .55; }
.small { font-size: 12.5px; }
.searchbig input { min-width: 220px; }

/* ---- Stage 3 wave 3: company info, settings & access, audit log ---- */
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img, .logo-lg img { max-width: 120px; max-height: 84px; object-fit: contain; }
.nav-item.dragging { opacity: .55; }
.perm-row { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.perm-row input { margin-top: 2px; }
.access-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); }
.access-row select, .access-row input { padding: 7px 9px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }
.navord-row { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.navord-row .spacer { flex: 1; }
.log-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.log-tools label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.log-tools input { padding: 8px 10px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; color: #212124; }
.co-own-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.co-own-row input { padding: 7px 9px; border: 1px solid #c9cdd2; border-radius: 6px; font-size: 14px; }
.co-logo-img { max-width: 180px; max-height: 110px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.linklike { background: none; border: none; color: var(--link, #1a73e8); cursor: pointer; font-size: 12.5px; padding: 0; text-decoration: underline; }
/* check layout visual designer (ported from the current app's drawing) */
.chkDraw { position: relative; background: #fff; border: 1.5px solid #9aa0a6; border-radius: 4px; overflow: hidden; outline: none; }
.chkDraw:focus { border-color: #1a73e8; }
.chkDraw .cfld { position: absolute; white-space: nowrap; cursor: move; border: 1px dashed #2ca01c; background: rgba(44,160,28,.08); padding: 0 2px; color: #222; user-select: none; -webkit-user-select: none; touch-action: none; line-height: 1.25; }
.chkDraw .cfld.addr { white-space: pre-line; line-height: 1.3; }
.chkDraw .cfld.sel { border: 1.5px solid #2ca01c; background: rgba(44,160,28,.18); z-index: 3; }

/* check printing: the sheet lives in #print-area; spans positioned in inches */
.chk-sheet { position: relative; width: 8.5in; height: 11in; }
.chk-sheet .cf { position: absolute; white-space: nowrap; font-size: 12pt; color: #000; }
.chk-sheet .cf.addr { white-space: pre-line; line-height: 1.3; }
@media print {
  body.print-check #print-area { padding: 0; }
}
