/* Bottom Line (was GRiN Finances; 2026-10-25, redesigned 2026-10-26). Builds on styles.css + finance.css (Sora, Chairside colors, .card/.kpi/.fin tables). */
[hidden] { display: none !important; }
.fx-body { background: var(--bg); color: var(--ink); margin: 0; }
.fx { max-width: 1180px; margin: 0 auto; padding: 14px 16px 32px; padding-top: max(14px, env(safe-area-inset-top)); }
.fx-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fx-head .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-mark { width: 44px; height: 44px; flex: none; }
.fx-head h1 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--brand-ink); letter-spacing: -.01em; }
.fx-head .sub { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.fx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fx-month { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.fx-month select { font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); padding: 7px 10px; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
a.sc-btn.fx-dep { text-decoration: none; } a.sc-btn.fx-dep:visited { color: #fff; }
.fx-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.fx-sample { background: #fff7d6; border: 2px dashed var(--brand-yellow); color: #5c4400; border-radius: 12px; padding: 10px 14px; font-weight: 800; margin-bottom: 12px; text-align: center; }
.fx-is-sample .card { background-image: repeating-linear-gradient(135deg, rgba(239,200,41,.06) 0 14px, transparent 14px 28px); }
.fx-office { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.fx-ochip { flex: none; border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; min-height: 38px; font: 700 .86rem/1 "Sora", system-ui, sans-serif; cursor: pointer; }
.fx-ochip[aria-pressed="true"] { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.fx-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.fx-sub { color: var(--muted); font-size: .74rem; margin-top: 3px; }
.fx-up { color: var(--bad); } .fx-down { color: var(--good); }
.fx-dim { color: var(--muted); }
.fx-lead { color: var(--muted); font-size: .84rem; margin: -4px 0 10px; }
.fx-off { border: 1px solid var(--border); border-radius: 12px; margin: 10px 0; background: #fff; }
.fx-off > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 800; color: var(--brand-ink); }
.fx-off > summary::-webkit-details-marker { display: none; }
.fx-off > summary::before { content: "▸"; color: var(--brand); margin-right: 6px; transition: transform .15s; }
.fx-off[open] > summary::before { transform: rotate(90deg); }
.fx-off > summary > span:first-child { flex: 1; }
.fx-off-t { font-variant-numeric: tabular-nums; color: var(--ink); }
.fx-ent { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.fx-ent-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin: 10px 0 6px; }
.fx-ent-h h3 { margin: 0; font-size: .98rem; }
.fx-code { color: var(--muted); font-weight: 600; font-size: .78rem; }
.fx-chip { display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: .72rem; font-weight: 700; background: var(--tint); color: var(--brand-ink); border: 1px solid var(--border); margin: 2px 4px 2px 0; white-space: normal; }
.fx-chip.ok { background: #ecfdf5; color: var(--good); border-color: #a7f3d0; }
.fx-chip.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.fx-chip.warn { background: #fffbeb; color: var(--warn); border-color: #fde68a; }
table.fx-t td.num, table.fx-t th.num, table.fin td.num, table.fin th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.fx-t tbody th, table.fx-t tfoot th { font-weight: 600; text-align: left; white-space: normal; min-width: 130px; }
table.fx-t tfoot th, table.fx-t tfoot td { border-top: 2px solid var(--border); }
table.fx-t thead th:first-child, table.fx-t tbody th, table.fx-t tfoot th { position: sticky; left: 0; background: #fff; z-index: 1; }
table.fx-t thead th:first-child { background: var(--tint); }
.fx-alloc th, .fx-alloc td { background: #f7fbfd; }
table.fx-t .fx-alloc th { background: #f7fbfd; }
.fx-nob { color: var(--muted); font-style: italic; font-size: .76rem; }
.fx-note { color: var(--muted); font-size: .74rem; font-weight: 400; margin-top: 2px; white-space: normal; }
.fx-ent-f { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.fx-ent-f b { color: var(--ink); }
.fx-ent-n { margin: 6px 0 0; }
.fx-empty { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tint); color: var(--ink); font-size: .9rem; }
.fx-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.fx-list li { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: #fff; min-width: 0; }
.fx-li-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fx-amt { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-save { color: var(--good); }
.fx-li-s { color: var(--muted); font-size: .8rem; margin-top: 4px; overflow-wrap: anywhere; }
.fx-idea { margin-top: 6px; font-size: .9rem; }
#notes summary { cursor: pointer; } .fx-inline { display: inline; }
.fx-cav { margin: 10px 0 0; padding-left: 18px; font-size: .86rem; } .fx-cav li { margin: 6px 0; }
.fx-foot { text-align: center; color: var(--muted); font-size: .76rem; margin-top: 18px; }
@media (max-width: 640px) {
  .fx { padding: 10px 10px 28px; padding-top: max(10px, env(safe-area-inset-top)); }
  .fx-head h1 { font-size: 1.15rem; }
  .fx-actions { width: 100%; }
  .fx-month { flex: 1 1 100%; } .fx-month select { flex: 1; }
  .fx-actions > a, .fx-actions > button { flex: 1 1 0; justify-content: center; min-height: 44px; }
  .fx-kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 1.1rem; }
  .card { padding: 12px; }
  .fx-ent { padding: 4px 8px 12px; }
  table.fin { font-size: .8rem; }
  .fx-list { grid-template-columns: 1fr; }
}
/* row headers read as normal text (finance.css styles every th as a small uppercase column head) */
table.fx-t tbody th, table.fx-t tfoot th { text-transform: none; letter-spacing: normal; font-size: inherit; color: var(--ink); font-weight: 600; }
table.fx-t tfoot th { font-weight: 800; }

/* ---- Bottom Line redesign (2026-10-26) ---- */
.fx-body, .fx-body button, .fx-body select { font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif; }
.fx-office { align-items: center; }
.fx-ochip:disabled { opacity: .45; cursor: default; }
.fx-tt { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px 6px 8px; min-height: 38px; font: 800 .86rem/1 "Sora", system-ui, sans-serif; cursor: pointer; }
.fx-tt-k { width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .15s; }
.fx-tt-k::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.fx-tt[aria-checked="true"] { border-color: var(--brand-ink); color: var(--brand-ink); }
.fx-tt[aria-checked="true"] .fx-tt-k { background: var(--brand-ink); }
.fx-tt[aria-checked="true"] .fx-tt-k::after { transform: translateX(14px); }
.fx-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fx-sec-h h2 { margin-bottom: 8px; }
.fx-mini { min-height: 34px; padding: 0 12px; font-size: .8rem; }
.fx-h3 { margin: 12px 0 6px; font-size: .95rem; color: var(--brand-ink); }
.fx-st-good { color: var(--good); } .fx-st-warn { color: var(--warn); } .fx-st-bad { color: var(--bad); }
.kpi.fx-oh .v { font-weight: 800; }
table.fx-pl tr.fx-pl-row { cursor: pointer; }
table.fx-pl tr.fx-pl-row:hover th, table.fx-pl tr.fx-pl-row:hover td { background: #f3fafd; }
table.fx-pl tr.fx-pl-row:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: -2px; }
.fx-caret { display: inline-block; width: 14px; color: var(--brand); transition: transform .15s; }
.fx-caret::before { content: "▸"; }
tr.fx-pl-row[aria-expanded="true"] .fx-caret { transform: rotate(90deg); }
table.fx-t tr.fx-pl-sub th { padding-left: 26px; font-weight: 500; color: var(--muted); }
table.fx-t tr.fx-pl-sub th, table.fx-t tr.fx-pl-sub td { background: #f7fbfd; font-size: .86em; }
table.fx-t tr.fx-pl-sub-t th, table.fx-t tr.fx-pl-sub-t td { font-weight: 700; border-top: 1px solid var(--border); }
table.fx-t tr.fx-pl-total th, table.fx-t tr.fx-pl-total td { font-weight: 800; border-top: 2px solid var(--border); }
a.fx-go { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--tint); color: var(--ink); text-decoration: none; margin-bottom: 10px; min-height: 44px; }
a.fx-go b { display: block; color: var(--brand-ink); }
a.fx-go > span:last-child { font-size: 1.5rem; color: var(--brand-ink); }
a.fx-go:hover, a.fx-go:focus-visible { border-color: var(--brand-ink); }
.fx-go-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.fx-go-row a.fx-go { margin: 0; }
.fx-two { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.fx-flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-flag { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: .88rem; }
.fx-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; }
.fx-flag.bad { border-color: #fecaca; background: #fef2f2; } .fx-flag.bad .fx-dot { background: var(--bad); }
.fx-flag.warn { border-color: #fde68a; background: #fffbeb; } .fx-flag.warn .fx-dot { background: var(--warn); }
.fx-flag .fx-li-s { display: inline; }
@media (max-width: 640px) {
  .fx-hide-s { display: none; }
  .fx-two { grid-template-columns: 1fr; }
  .fx-tt { margin-left: 0; }
  .fx-seg { margin-left: 0; width: 100%; }
  .fx-seg-b { flex: 1 1 0; padding: 8px 6px; }
}

/* Bottom Line views (2026-10-26): P&L | PMS <-> Books | Profit, debt & fees (the former Chairside Finances tab) */
.fx-views { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; font-family: "Sora", system-ui, sans-serif; }
.fx-views button, .fx-views a { flex: 1 1 0; text-align: center; padding: 10px 12px; border-radius: 999px; border: 1px solid #d6e3e8; background: #fff; color: #13242b; font: 600 .9rem/1.2 "Sora", system-ui, sans-serif; white-space: nowrap; cursor: pointer; text-decoration: none; }
.fx-views button[aria-selected="true"] { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.fx-views a { color: var(--brand-ink); }
tr.fx-grp th { background: #f2f7f9; text-align: left; font-weight: 700; }
/* Bottom Line feed v2 (2026-10-26) */
.fx-vf { margin-top: .25em; line-height: 1.4; }
.fx-bvs th .fx-chip { font-size: .7em; }
#bankNotesTable td.wrap { white-space: normal; min-width: 10em; }

/* 2026-10-27: Books toggle GRiN | 3220 / TT20 (CTF PC removed 2026-11-02: Bookkeeper-only) */
.fx-seg { flex: none; margin-left: auto; display: inline-flex; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 3px; gap: 2px; }
.fx-seg-b { border: 0; background: transparent; color: var(--ink); border-radius: 999px; padding: 7px 13px; min-height: 32px; font: 800 .82rem/1 "Sora", system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.fx-seg-b[aria-checked="true"] { background: var(--brand-ink); color: #fff; }
.fx-seg-b:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

/* BL_PERIOD (2026-11-03): Month | Year to date | Trailing 12 months */
.fx-pseg { margin-left: 0; }
.fx-range { padding: 12px 14px; border-left: 4px solid var(--brand-ink, #029ec3); }
.fx-range-h { font-size: 1rem; color: var(--ink); margin-bottom: 4px; }
.fx-range .fx-note { margin: 0; }
@media (max-width: 640px) { .fx-pseg { width: 100%; order: -1; } .fx-pseg .fx-seg-b { flex: 1 1 0; padding: 9px 4px; min-height: 40px; } }
