:root {
  --bg: #d9dee6;
  --panel: #ffffff;
  --ink: #1c2533;
  --muted: #5f6b7d;
  --line: #d5dae2;
  --accent: #2e8b47;
  --accent-ink: #ffffff;
  --accent-soft: #e8f6eb;
  --green: #1d7a3a;
  --green-soft: #dcf3e2;
  --red: #b42318;
  --red-soft: #fde4e1;
  --amber: #a15c07;
  --amber-soft: #fdf0d2;
  --chrome: #eef1f5;
  --chrome-2: #e1e6ed;
  --side: #2b5a35;
  --side-ink: #d6dceb;
  --radius: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.45 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
kbd { font: 11px ui-monospace, Menlo, monospace; color: var(--muted); margin-left: auto; padding-left: 18px; }

/* Desktop chrome */
.app { display: flex; flex-direction: column; height: 100vh; }
.app.locked { display: none; }
.titlebar { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; background: linear-gradient(#3d7a47, #2b5a35); color: #e7ecf5; font-size: 12px; flex-shrink: 0; }
.tb-logo { width: 18px; height: 18px; border-radius: 4px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.tb-app { font-weight: 600; }
.tb-sep { opacity: .5; }
.tb-company { font-weight: 600; color: #fff; }
.tb-right { margin-left: auto; opacity: .85; }
.menubar { display: flex; background: var(--chrome); border-bottom: 1px solid #c4cbd6; height: 28px; padding: 0 4px; flex-shrink: 0; position: relative; z-index: 30; }
.menu { position: relative; }
.menu > button { border: none; background: none; font: inherit; padding: 0 11px; height: 27px; cursor: default; color: var(--ink); }
.menu > button:hover, .menu.open > button { background: #d3efd8; }
.dropdown { display: none; position: absolute; top: 27px; left: 0; min-width: 240px; background: #fff; border: 1px solid #aab4c3; box-shadow: 2px 4px 14px rgba(0,0,0,.18); padding: 3px 0; }
.menu.open .dropdown { display: block; }
.dropdown a { display: flex; padding: 5px 22px; color: var(--ink); white-space: nowrap; }
.dropdown a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.dropdown a:hover kbd { color: #dce8f6; }
.dropdown hr { border: none; border-top: 1px solid var(--line); margin: 3px 0; }
.body { display: flex; flex: 1; min-height: 0; }
.iconbar { width: 196px; flex-shrink: 0; background: var(--side); color: var(--side-ink); overflow-y: auto; padding-bottom: 12px; }
.ib-search { padding: 10px 10px 4px; position: relative; }
.ib-search input { background: #1b273a; border-color: #3b4c69; color: #fff; font-size: 12px; padding: 6px 8px; }
.ib-search input::placeholder { color: #8e9ab3; }
.search-results { position: absolute; left: 10px; right: -260px; top: 42px; background: #fff; border: 1px solid #aab4c3; box-shadow: 2px 4px 14px rgba(0,0,0,.25); z-index: 40; max-height: 380px; overflow-y: auto; }
.search-results a { display: block; padding: 6px 10px; color: var(--ink); border-bottom: 1px solid #f0f2f5; }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); text-decoration: none; }
.search-results small { color: var(--muted); margin-left: 6px; }
.ib-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #8e9ab3; margin: 14px 12px 4px; }
.iconbar a { display: flex; align-items: center; gap: 10px; color: var(--side-ink); padding: 7px 12px; border-left: 3px solid transparent; }
.iconbar a i { font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; background: rgba(255,255,255,.08); border-radius: 4px; font-size: 13px; }
.iconbar a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.iconbar a.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: #a7e3b0; font-weight: 600; }
.workspace { flex: 1; min-width: 0; overflow: auto; padding: 12px; }
.window { background: #fff; border: 1px solid #a9b3c2; box-shadow: 0 2px 8px rgba(30,40,60,.15); min-height: calc(100% - 2px); display: flex; flex-direction: column; }
.window-title { display: flex; justify-content: space-between; align-items: center; height: 28px; padding: 0 10px; background: linear-gradient(#f4f6f9, #dfe4eb); border-bottom: 1px solid #b9c2cf; font-weight: 600; font-size: 12px; position: sticky; top: -12px; z-index: 5; }
.window-ctrls a { color: var(--muted); padding: 0 4px; }
.window-ctrls a:hover { color: var(--red); text-decoration: none; }
.view { padding: 18px 22px 40px; flex: 1; }
.statusbar { display: flex; justify-content: space-between; height: 22px; padding: 0 10px; align-items: center; background: var(--chrome); border-top: 1px solid #c4cbd6; font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 19px; font-weight: 600; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Home workflow */
.home { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
@media (max-width: 1100px) { .home { grid-template-columns: 1fr; } }
.flow-panel { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.flow-panel > h4 { margin: 0; padding: 6px 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(#4f9e5c, #3b8048); }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 16px 14px; background: linear-gradient(#fbfcfe, #f2f5f9); }
.flow .arrow { color: #8796ad; font-size: 20px; padding: 0 2px; }
.tile { width: 104px; text-align: center; color: var(--ink); padding: 8px 4px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; background: none; font: inherit; }
.tile:hover { background: #fff; border-color: #b8cbe3; box-shadow: 0 2px 6px rgba(31,111,178,.15); text-decoration: none; }
.tile .ico { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.tile span { display: block; font-size: 12px; line-height: 1.25; }
.tile .count { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ico.blue { background: linear-gradient(#4b93d6, #2b6fae); }
.ico.teal { background: linear-gradient(#36a89b, #1f7f74); }
.ico.orange { background: linear-gradient(#f0a246, #cf7a16); }
.ico.purple { background: linear-gradient(#8f72d6, #6a4cb5); }
.ico.slate { background: linear-gradient(#7d8ba1, #56637a); }
.ico.green { background: linear-gradient(#58b368, #2f8a42); }
.side-box { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.side-box h4 { margin: 0; padding: 6px 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; background: var(--chrome-2); border-bottom: 1px solid var(--line); }
.side-box .rows a, .side-box .rows div { display: flex; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid #f0f2f5; color: var(--ink); }
.side-box .rows a:hover { background: var(--accent-soft); text-decoration: none; }
.side-box .tiles { display: flex; flex-wrap: wrap; padding: 8px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #2b5a35, #2e8b47); }
.login { background: #fff; width: 360px; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
.login-head { background: linear-gradient(#3d7a47, #2b5a35); color: #fff; padding: 18px 22px; display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 600; }
.login form { padding: 20px 22px; }
.login .err { color: var(--red); min-height: 18px; margin-bottom: 6px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1000px) { .grid.two { grid-template-columns: 1fr; } }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 6px; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }

/* Buttons & inputs */
.btn { border: 1px solid #b3bccb; background: linear-gradient(#fff, #eef1f5); color: var(--ink); padding: 6px 13px; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 500; }
.btn:hover { border-color: #c5cad8; }
.btn.primary { background: linear-gradient(#43a85a, #2e8b47); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.link { border: none; background: none; color: var(--accent); padding: 4px 6px; }
input, select, textarea {
  font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.field { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.search { max-width: 260px; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: #fafbfd; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8f9ff; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

.lines td { padding: 5px 6px; }
.lines input, .lines select { padding: 6px 7px; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.paid { background: var(--green-soft); color: var(--green); }
.badge.overdue { background: var(--red-soft); color: var(--red); }
.badge.open, .badge.partial { background: var(--amber-soft); color: var(--amber); }
.badge.draft { background: #eceef3; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.hidden { display: none !important; }
.right { text-align: right; }

/* Totals box */
.totals { margin-left: auto; width: 300px; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .grand { font-size: 18px; font-weight: 700; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* Reports */
.report { max-width: 820px; margin: 0 auto; }
.report-title { text-align: center; margin-bottom: 18px; }
.report-title h2 { margin: 0; }
.report-title div { color: var(--muted); }
.report table td { border-bottom: 1px dashed var(--line); }
.report .section td { font-weight: 700; background: #fafbfd; border-bottom: 1px solid var(--line); }
.report .subtotal td { font-weight: 600; border-top: 1px solid var(--ink); }
.report .total td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); }
.report .indent { padding-left: 28px; }
.report-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.report-list a.card { color: var(--ink); display: block; }
.report-list a.card:hover { border-color: var(--accent); text-decoration: none; }
.report-list p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* Chart */
.chart svg { width: 100%; height: 240px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.bar-row .bar-label { width: 130px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { flex: 1; height: 10px; background: #eef0f5; border-radius: 6px; overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bar-row .bar-val { width: 110px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 24, 40, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.close-x { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* Invoice document */
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; max-width: 860px; }
.doc-head { display: flex; justify-content: space-between; margin-bottom: 30px; }
.doc-head h2 { margin: 0; font-size: 28px; letter-spacing: .05em; color: var(--accent); }
.doc-meta { display: grid; grid-template-columns: auto auto; gap: 2px 14px; text-align: right; }
.doc-meta span:nth-child(odd) { color: var(--muted); }
.doc-to { margin-bottom: 24px; }

@media print {
  .titlebar, .menubar, .toolbar, .account-banner, .home-tabs, .statusbar, .window-title, .page-head .actions, .no-print { display: none !important; }
  .app { height: auto; } .workspace { overflow: visible; padding: 0; } .window { border: none; box-shadow: none; }
  body { background: #fff; }
  .view { padding: 0; }
  .doc, .card, .table-wrap { border: none; }
}

/* ---------- SaaS: auth tabs, account banner, invites ---------- */
.auth-tabs { display: flex; border-bottom: 1px solid var(--line, #d9dee6); }
.auth-tabs a { flex: 1; text-align: center; padding: 11px 0; color: #5b6676; text-decoration: none; cursor: pointer; font-weight: 600; }
.auth-tabs a.on { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.login-foot { padding: 0 22px 16px; font-size: 13px; }
.login-foot a { color: #5b6676; }
.account-banner { background: #fff7d6; color: #6b5300; border-bottom: 1px solid #ecd98a; padding: 6px 14px; font-size: 13px; }
.account-banner.warn { background: #fde8e8; color: #8a1f1f; border-color: #f2b8b8; }
.account-banner a { color: inherit; font-weight: 600; margin-left: 6px; }
.invite-link { margin-top: 12px; padding: 10px 12px; background: #f3faf4; border: 1px solid #d3efd8; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.invite-link p { margin: 0; width: 100%; }
.invite-link input { flex: 1; min-width: 240px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ---------- Desktop chrome v3: horizontal icon toolbar ---------- */
.tb-company { color: #fff; } .tb-company:hover { text-decoration: underline; }
.toolbar { display: flex; align-items: stretch; gap: 0; background: linear-gradient(#58b267, #3b914a); border-bottom: 1px solid #2f7a3c; padding: 0 6px; flex-shrink: 0; overflow-x: auto; position: relative; z-index: 20; }
.toolbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; padding: 5px 9px 4px; color: #e6eef8; font-size: 11.5px; white-space: nowrap; border-bottom: 3px solid transparent; }
.toolbar a i { font-style: normal; font-size: 19px; line-height: 22px; height: 22px; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.toolbar a:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.toolbar a.active { background: rgba(255,255,255,.14); border-bottom-color: #ffffff; color: #fff; }
.toolbar .tsep { width: 1px; background: rgba(255,255,255,.18); margin: 8px 4px; }
.toolbar .tb-flex { flex: 1; }
.toolbar .ib-search { align-self: center; padding: 0 4px 0 10px; position: relative; width: 240px; flex-shrink: 0; }
.toolbar .ib-search input { background: #fff; border: 1px solid #2f7a3c; color: var(--ink); font-size: 12px; padding: 5px 8px; border-radius: 3px; }
.toolbar .search-results { left: auto; right: 4px; top: 34px; width: 340px; }
.feature-locked::after { content: ' 🔒'; font-size: 10px; }
.toolbar a.feature-locked::after { position: absolute; margin: -2px 0 0 26px; }
.workspace { padding: 10px 12px; }

/* Home page / Insights tabs */
.home-tabs { display: flex; gap: 2px; margin: -8px 0 14px; border-bottom: 2px solid #2e8b47; }
.home-tabs a { padding: 6px 16px; font-weight: 600; color: #46566e; background: #e6ebf2; border: 1px solid #c8d1dd; border-bottom: none; border-radius: 4px 4px 0 0; }
.home-tabs a.on { background: #2e8b47; color: #fff; border-color: #2e8b47; }
.home-tabs a:hover { text-decoration: none; }

/* Home workflow diagram */
.home2 { display: grid; grid-template-columns: minmax(520px, 1.8fr) minmax(250px, .85fr) 270px; gap: 12px; align-items: start; }
@media (max-width: 1280px) { .home2 { grid-template-columns: minmax(480px, 1.6fr) minmax(240px, .9fr); } .hcol-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } }
@media (max-width: 900px) { .home2 { grid-template-columns: 1fr; } }
.fpanel { position: relative; background: linear-gradient(#fdfdfe, #f1f3f6); border: 1px solid #cfd6e0; border-radius: 4px; margin-bottom: 12px; padding: 22px 10px 8px; }
.fp-title { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); background: #e5f5e8; border: 1px solid #a8d8b2; border-top: none; color: #2a7a3b; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 1px 12px 2px; border-radius: 0 0 4px 4px; }
.fp-canvas { position: relative; width: 100%; }
.fp-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fp-canvas svg path { stroke: #8a97ab; stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.fnode { position: absolute; transform: translate(-50%, -22px); display: flex; flex-direction: column; align-items: center; width: 108px; text-align: center; color: #33415a; background: none; border: 1px solid transparent; border-radius: 6px; padding: 2px 2px 4px; cursor: pointer; font: inherit; }
.fnode:hover { background: rgba(255,255,255,.9); border-color: #b8cbe3; text-decoration: none; box-shadow: 0 2px 8px rgba(31,111,178,.15); }
.fico { position: relative; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 19px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.2); }
.fico em { position: absolute; right: -8px; top: -8px; font-style: normal; font-size: 12px; }
.flabel { font-size: 12px; line-height: 1.2; margin-top: 4px; }
.fcount { font-size: 10.5px; color: var(--muted); }
.fnode.locked { opacity: .55; }
.grid-panel { padding-top: 24px; }
.gp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 4px; padding: 6px 0 4px; }
.gp-tiles .fnode { position: relative; transform: none; width: auto; }
.ico.red, .fico.red { background: linear-gradient(#e86a5c, #c2412f); }
.hcol-side .side-box { background: #fff; }

/* Form banners (desktop-style transaction windows) */
.form-card { position: relative; }
.form-banner { font-size: 26px; font-weight: 300; letter-spacing: .02em; color: #2a7a3b; margin: -4px 0 12px; }
.form-card.estimate .form-banner { color: #2f8a42; } .form-card.receipt .form-banner { color: #1f7f74; } .form-card.credit .form-banner { color: #c2412f; }
.form-card.po .form-banner, .form-card.bill .form-banner { color: #cf7a16; }

/* Status badges */
.badge.pending, .badge.accepted { background: var(--accent-soft); color: var(--accent); }
.badge.rejected, .badge.expired { background: #eceef3; color: var(--muted); }
.badge.closed { background: var(--green-soft); color: var(--green); }
td.center, th.center { text-align: center; }

/* Upsell */
.upsell { max-width: 620px; text-align: center; padding: 34px; margin: 20px auto; }
.upsell-ico { font-size: 36px; } .upsell h2 { font-size: 19px; margin: 10px 0 6px; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; }
.plan-card.current { border: 2px solid var(--accent); background: #f6faff; }
.pc-name { font-weight: 700; font-size: 15px; }
.pc-price { font-size: 26px; font-weight: 800; margin: 4px 0; } .pc-price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-card ul { padding-left: 18px; margin: 8px 0 12px; flex: 1; } .plan-card li { margin: 2px 0; }

/* Reconcile */
.recon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) { .recon-grid { grid-template-columns: 1fr; } }
.recon-col { padding: 12px; max-height: 52vh; overflow: auto; }
.recon-col td, .recon-col th { padding: 6px 8px; }
.recon-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; position: sticky; bottom: 0; }
.recon-summary div { display: flex; flex-direction: column; } .recon-summary span { color: var(--muted); font-size: 12px; } .recon-summary strong { font-size: 16px; }
.recon-summary .diff strong { font-size: 20px; }
@media (max-width: 900px) { .recon-summary { grid-template-columns: repeat(3, 1fr); } }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Import */
.import-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0; }
.import-steps .card { position: relative; padding-top: 22px; }
.step { position: absolute; top: -12px; left: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.import-done { background: var(--green-soft); border-color: #a8dcb6; color: var(--green); margin: 12px 0; }
.import-intro { margin-bottom: 14px; }
label.btn { display: inline-block; margin: 0; color: var(--ink); font-size: 13px; }
label.btn.primary { color: #fff; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 13px; }
label.check input { width: auto; }

/* Company switcher */
.company-list { display: flex; flex-direction: column; gap: 6px; }
.company-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.company-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.company-row.current { border-color: var(--accent); }
.company-row small { display: block; color: var(--muted); }
.app > .workspace { min-height: 0; flex: 1; }
.fico.blue { background: linear-gradient(#4b93d6, #2b6fae); }
.fico.teal { background: linear-gradient(#36a89b, #1f7f74); }
.fico.orange { background: linear-gradient(#f0a246, #cf7a16); }
.fico.purple { background: linear-gradient(#8f72d6, #6a4cb5); }
.fico.slate { background: linear-gradient(#7d8ba1, #56637a); }
.fico.green { background: linear-gradient(#58b368, #2f8a42); }
.toolbar a { flex-shrink: 0; }

/* ---------- Payroll ---------- */
.small-tabs { margin: -6px 0 14px; } .small-tabs a { cursor: pointer; padding: 7px 12px; }
.payrun td { padding: 5px 6px; } .payrun tr.off td { opacity: .45; } .payrun input { padding: 5px 6px; }
.ts td { padding: 4px 5px; } .ts input { padding: 5px 6px; } .ts th .small { font-weight: 400; text-transform: none; }
.stub table td, .stub table th { padding: 6px 8px; }
.stub .subtotal td { border-top: 1px solid var(--ink); } .stub .total td { border-top: 2px solid var(--ink); font-size: 15px; }
.payroll-form h2 { margin-top: 0; color: var(--accent); font-size: 20px; }
.payroll-form .total td { font-weight: 700; border-top: 2px solid var(--ink); }
.w2 { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow: hidden; break-inside: avoid; }
.w2-head { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #fafbfd; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.w2-grid { display: grid; grid-template-columns: 1fr 1fr; }
.w2-grid div { display: flex; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid #f0f2f5; border-right: 1px solid #f0f2f5; }
.w2-grid span { color: var(--muted); font-size: 12px; }

/* ---------- Platform admin ---------- */
.admin-table td { vertical-align: top; }
.adm-actions { white-space: nowrap; } .adm-actions .btn { margin: 0 2px 4px 0; }
.account-banner.support { background: #e8f1ff; color: #1b4f8f; border-color: #b8d2f5; }

/* ---------- Light green theme ---------- */
:root { --bg: #e4ece5; --chrome: #f1f7f2; --chrome-2: #e2efe4; --line: #d4e2d6; }
.toolbar a { text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.toolbar a.active { background: rgba(255,255,255,.22); }
.toolbar .tsep { background: rgba(255,255,255,.35); }
.menubar { border-bottom-color: #bcd6c0; }
.window { border-color: #a9c4ad; }
.window-title { background: linear-gradient(#f4faf5, #dcecdf); border-bottom-color: #b5ccb9; }
.statusbar { border-top-color: #bcd6c0; }
.fpanel { background: linear-gradient(#fdfefd, #f0f6f1); border-color: #cfe0d2; }
.fnode:hover { border-color: #a8d8b2; box-shadow: 0 2px 8px rgba(46,139,71,.18); }
.home-tabs a { background: #e6f1e8; border-color: #c4dcc8; color: #3f5a45; }
.side-box h4 { background: #e2efe4; }
.form-card.invoice .form-banner { color: #2a7a3b; }
th { background: #f7fbf8; }
tr.clickable:hover td { background: #f3faf4; }
.plan-card.current { background: #f3faf4; }

/* ---------- First-year promotion ---------- */
.promo-chip { display: inline-block; margin-left: 8px; background: #2e8b47; color: #fff; padding: 1px 10px; border-radius: 99px; font-weight: 600; }
.promo-box { background: #eaf8ec; border: 1px solid #b6e2bf; color: #1f6b33; border-radius: 8px; padding: 9px 12px; margin: 10px 0; }
.pc-promo { display: inline-block; background: #2e8b47; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-top: 6px; }
.pc-price s, .price s { color: #8a96a8; font-weight: 500; font-size: .6em; margin-right: 4px; }

/* ---------- LedgerBrain AI ---------- */
.toolbar a.ai-tool { background: rgba(255,255,255,.16); border-radius: 6px; margin: 4px 6px; }
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; background: #fff; box-shadow: -12px 0 40px rgba(20,40,25,.22); z-index: 45; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.ai-drawer.open { transform: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: linear-gradient(135deg, #2e8b47, #58b267); color: #fff; }
.ai-head small { display: block; opacity: .85; } .ai-head .close-x { margin-left: auto; color: #fff; }
.ai-spark { font-size: 22px; }
.ai-body { flex: 1; overflow-y: auto; padding: 16px; background: #f6faf7; }
.ai-msg { max-width: 92%; padding: 10px 13px; border-radius: 12px; margin-bottom: 10px; line-height: 1.5; }
.ai-msg.user { margin-left: auto; background: #2e8b47; color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-msg.assistant { background: #fff; border: 1px solid #d4e2d6; border-bottom-left-radius: 4px; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin: 0; } .ai-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.ai-hello p { margin-top: 0; }
.ai-chips { display: flex; flex-direction: column; gap: 6px; }
.ai-chips button { text-align: left; border: 1px solid #b6e2bf; background: #fff; color: #1f6b33; border-radius: 10px; padding: 8px 11px; cursor: pointer; font: inherit; }
.ai-chips button:hover { background: #eaf8ec; }
.ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #d4e2d6; }
.ai-form textarea { resize: none; }
.ai-foot { padding: 0 14px 12px; font-size: 11.5px; color: var(--muted); }
.ai-typing span { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: #58b267; animation: aiDot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; } .ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-card { border-color: #b6e2bf; background: linear-gradient(#fbfefb, #f2faf3); }
.ai-card ul { margin: 0; padding-left: 20px; } .ai-card li { margin: 4px 0; }
.ai-side form { display: flex; gap: 6px; padding: 8px; } .ai-side input { padding: 6px 8px; }
.ai-suggest { margin-top: 2px; padding-left: 0; } .ai-mini { padding: 3px 7px; }

/* AI add-on */
.addon-row { display: flex; align-items: center; gap: 14px; padding: 6px 0; flex-wrap: wrap; }
.addon-ico { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, #6abf5e, #2e8b47); display: grid; place-items: center; font-size: 20px; }
.addon-price { background: #eaf8ec; border: 1px solid #b6e2bf; color: #1f6b33; padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.addon-list { padding-left: 20px; margin: 10px 0; } .addon-list li { margin: 4px 0; }

/* Monthly / annual toggle */
.bill-toggle { display: inline-flex; background: #eef3ef; border: 1px solid var(--line); border-radius: 99px; padding: 3px; margin-bottom: 12px; }
.bill-toggle button { border: none; background: none; padding: 6px 16px; border-radius: 99px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.bill-toggle button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.bill-toggle .save { background: var(--accent); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; margin-left: 4px; }

/* Sub-accounts */
.report .parent-head td { font-weight: 600; } .report .parent-total td { font-weight: 600; border-top: 1px solid #c9d3cc; }
.side-box .rows a.sub span { color: #4b5563; } .side-box .rows a.sub span::before { content: '└ '; color: #9aa5b5; }
