/* Food Business Portal: money pages (Food Business Portal design, Oct 2026): Snac Connect (invoices and statements, one
   invoice, What you owe, Pay Later and credit, payments, payment methods, all sites) and Rewards (loyalty points).
   Scoped under body.fb .fbm so no other page changes. Colours only from the toned tokens. */

/* app.css also has a .ph (the product picture placeholder: full height, hatched); undo it for the page header. */
body.fb .fbm > .ph { width: auto; height: auto; background: none; font-size: inherit; color: inherit; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
body.fb .fbm .ph-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
body.fb .fbm .ph-a form { margin: 0; }
body.fb .fbm .card { margin-bottom: 16px; }
body.fb .fbm .card > h2:first-child, body.fb .fbm .card-h h2 { font-size: 19px; }
body.fb .fbm .card-h { margin-bottom: 12px; }
body.fb .fbm .card-h > a { white-space: nowrap; }
body.fb .fbm .card-h .muted { font-family: var(--body); font-size: 13px; font-weight: 500; margin-left: 6px; }
body.fb .fbm .kpi.urgent { border-color: var(--pink); }
body.fb .fbm .fb-cols > div > section:last-child { margin-bottom: 16px; }
body.fb .fbm .hint { color: var(--muted); }

/* Tables: full width, right-aligned money, a second line under the main value */
body.fb .fbm .tablewrap { overflow-x: auto; margin: 0; }
body.fb .fbm table.fbm-t { width: 100%; }
body.fb .fbm table.fbm-t .num { text-align: right; white-space: nowrap; }
body.fb .fbm .fbm-nowrap { white-space: nowrap; }
body.fb .fbm .fbm-sub { display: block; font-size: 12.5px; margin-top: 1px; }
body.fb .fbm a.fbm-num { font-weight: 700; }
body.fb .fbm .btn.fbm-row { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-width: 1.5px !important; border-color: var(--line) !important; display: inline-flex; align-items: center; }
body.fb .fbm .btn.fbm-row:hover { border-color: var(--ink) !important; }
body.fb .fbm tr.fbm-edge > td { background: var(--seashell); }
body.fb .fbm .fbm-empty { margin: 4px 0 0; color: var(--muted); }
body.fb .fbm .fbm-foot { margin: 10px 0 0; font-size: 13px; }
body.fb .fbm .fbm-settled { display: block; white-space: nowrap; }
body.fb .fbm input[type=checkbox] { width: 20px; height: 20px; }

/* Filter tabs and search on one bar */
body.fb .fbm .fbm-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
body.fb .fbm .seg a[aria-current="page"] { background: var(--ink); color: var(--seashell); }
body.fb .fbm .seg a .ct { margin-left: 4px; background: var(--shell2); color: var(--ink); font-family: var(--body); }
body.fb .fbm .seg a.on .ct { background: var(--seashell); }
body.fb .fbm .fbm-search { display: flex; gap: 8px; align-items: center; flex: 1 1 260px; max-width: 420px; margin: 0; }
body.fb .fbm .fbm-search input[type=search] { flex: 1; min-width: 0; min-height: 40px; border-radius: 999px; }
body.fb .fbm .fbm-search button { min-height: 40px; }

/* Pay selected */
body.fb .fbm .fbm-paybar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; margin: 14px 0 0; padding: 14px 18px; box-shadow: var(--sh-pop) !important; }
body.fb .fbm .fbm-paybar fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
body.fb .fbm .fbm-paybar legend { font-family: var(--display); font-weight: 700; font-size: 16px; margin: 0 0 4px; float: none; width: auto; }
body.fb .fbm .fbm-paybar fieldset label { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 3px 0; }
body.fb .fbm .fbm-paybar-a { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
body.fb .fbm .fbm-paybar-n { grid-column: 1 / -1; margin: 0; font-size: 12.5px; }
@media (max-width: 700px) { body.fb .fbm .fbm-paybar { grid-template-columns: 1fr; } body.fb .fbm .fbm-paybar-a { align-items: stretch; text-align: left; } }

/* Definition lists and link lists in side cards */
body.fb .fbm .fbm-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 0 0 10px; }
body.fb .fbm .fbm-dl dt { color: var(--muted); font-weight: 500; }
body.fb .fbm .fbm-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
body.fb .fbm .fbm-links { list-style: none; margin: 0; padding: 0; }
body.fb .fbm .fbm-links li a { display: flex; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--hair); text-decoration: none; font-weight: 600; }
body.fb .fbm .fbm-links li:first-child a { border-top: 0; }
body.fb .fbm .fbm-links li a:hover { background: var(--seashell); }
body.fb .fbm .fbm-links-inline { margin: 10px 0 0; font-size: 13.5px; }
body.fb .fbm .fbm-notes { background: var(--seashell); border-width: 1.5px !important; border-color: var(--line) !important; }
body.fb .fbm .fbm-notes h2 { font-size: 15px !important; }
body.fb .fbm .fbm-notes ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
body.fb .fbm .fbm-notes li { margin: 5px 0; }
body.fb .fbm .fbm-k { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }

/* One invoice */
body.fb .fbm-doc .fbm-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
body.fb .fbm-doc .fbm-parties > div { display: flex; flex-direction: column; gap: 2px; }
body.fb .fbm-doc .fbm-parties .hint { font-size: 12.5px; }
@media (max-width: 700px) { body.fb .fbm-doc .fbm-parties { grid-template-columns: 1fr; } }
body.fb .fbm-doc .fbm-reason { margin: 0 0 14px; }
body.fb .fbm-doc .fbm-grp { border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 12px; }
body.fb .fbm-doc .fbm-grp h3 { margin: 0; padding: 9px 14px; background: var(--ok-bg); font-size: 14px; display: flex; gap: 8px; align-items: center; }
body.fb .fbm-doc .fbm-grp:nth-of-type(2n) h3 { background: #DDF6F6; }
body.fb .fbm-doc .fbm-grp ul { list-style: none; margin: 0; padding: 0; }
body.fb .fbm-doc .fbm-grp li { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; gap: 12px; align-items: baseline; padding: 9px 14px; border-top: 1px solid var(--hair); font-size: 13.5px; }
body.fb .fbm-doc .fbm-grp li:first-child { border-top: 0; }
body.fb .fbm-doc .fbm-ld .hint { display: block; font-size: 12px; }
body.fb .fbm-doc .fbm-lq { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
body.fb .fbm-doc .fbm-la { text-align: right; white-space: nowrap; }
body.fb .fbm-doc .fbm-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; margin: 16px 0 0; padding: 0 14px; }
body.fb .fbm-doc .fbm-totals dt { font-weight: 500; }
body.fb .fbm-doc .fbm-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
body.fb .fbm-doc .fbm-totals .fbm-tot { border-top: 1.5px solid var(--ink); padding-top: 10px; margin-top: 6px; font-family: var(--display); font-size: 18px; font-weight: 700; }
@media (max-width: 560px) { body.fb .fbm-doc .fbm-grp li { grid-template-columns: minmax(0, 1fr) auto; } body.fb .fbm-doc .fbm-lq { grid-column: 1; } }

/* Statement and all sites: period form */
body.fb .fbm .fbm-period { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 14px; }
body.fb .fbm .fbm-period > div { display: flex; flex-direction: column; gap: 4px; flex: 0 1 200px; }
body.fb .fbm .fbm-period button { min-height: 44px; }

/* Pay Later and credit */
body.fb .fbm-credit .fbm-alert { border-color: var(--pink) !important; box-shadow: 3px 3px 0 var(--pink) !important; }
body.fb .fbm-credit .fbm-alert h2 { display: flex; gap: 8px; align-items: center; color: var(--pink-d); }
body.fb .fbm-credit .fbm-alert p:last-child { margin-bottom: 0; }
body.fb .fbm-credit .fbm-of { font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--muted); }
body.fb .fbm .fbm-meter { height: 14px; border-radius: 999px; background: var(--shell2); border: 1.5px solid var(--ink); overflow: hidden; margin: 10px 0 4px; }
body.fb .fbm .fbm-meter > div { height: 100%; background: var(--teal); }
body.fb .fbm .fbm-meter.warn > div { background: var(--pink); }
body.fb .fbm .fbm-meter-l { margin: 0 0 14px; font-size: 12.5px; }
body.fb .fbm .fbm-form label { display: block; margin: 10px 0 4px; }
body.fb .fbm .fbm-form input, body.fb .fbm .fbm-form textarea { width: 100%; }
body.fb .fbm .fbm-form p { margin: 12px 0 0; }

/* Payment methods: tiles */
body.fb .fbm-methods .fbm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-bottom: 16px; }
body.fb .fbm-methods .fbm-tile { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 16px 18px; }
body.fb .fbm-methods .fbm-tile.on { box-shadow: var(--sh-pop) !important; }
body.fb .fbm-methods .fbm-tile-v { font-family: var(--display); font-size: 18px; line-height: 1.2; }
body.fb .fbm-methods .fbm-tile-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
body.fb .fbm-methods .fbm-tile-a form { margin: 0; }
body.fb .fbm-methods .fbm-tile-a button { min-height: 34px; padding: 0 14px; font-size: 13px; }
body.fb .fbm-methods a.fbm-tile-link { text-decoration: none; color: var(--ink); } /* FB review (6) D3: active cards are solid; dashed only for optional or not connected (.fbm-tile.opt) */
body.fb .fbm-tile.opt, body.fb .fbc-opt { border-style: dashed !important; border-color: var(--idle-bd) !important; }
body.fb .fbm-methods a.fbm-tile-link:hover { background: var(--seashell); border-color: var(--ink) !important; }
body.fb .fbm-methods .fbm-go { margin-top: auto; font-weight: 700; font-size: 13px; }

/* Wallet: pay-in details as boxed rows, like the design's bank details */
body.fb .fbm-wallet .fbm-bank { border: 1.5px solid var(--line); border-radius: var(--r-sm); margin: 0 0 12px; }
body.fb .fbm-wallet .fbm-bank > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--hair); }
body.fb .fbm-wallet .fbm-bank > div:first-child { border-top: 0; }
body.fb .fbm-wallet .fbm-bank dt { color: var(--muted); font-weight: 500; }
body.fb .fbm-wallet .fbm-bank dd { margin: 0; }
body.fb .fbm-wallet .fbm-bank .mono { font-family: var(--mono); letter-spacing: .04em; }

/* Repayments: month rows inside the statement table */
body.fb .fbm table.fbm-t tr.fbm-month > th { background: transparent; padding: 14px 10px 6px 14px; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; text-transform: none; border-bottom: 1.5px solid var(--ink); border-radius: 0; }

/* Connected data: tabs, connection cards, action rows */
body.fb .fbm .fbm-tabs { margin: 0 0 16px; }
body.fb .fbm .fbm-lead { margin: -4px 0 14px; }
body.fb .fbm .fbm-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 8px 0 0; }
body.fb .fbm .fbm-actions > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.fb .fbm .fbm-alert { border-color: var(--pink) !important; box-shadow: 3px 3px 0 var(--pink) !important; }
body.fb .fbm .fbm-err { color: var(--pink-d); }
body.fb .fbm-data .fbm-conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
body.fb .fbm-data .fbm-conn { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; }
body.fb .fbm-data .fbm-conn-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
body.fb .fbm-data .fbm-conn-h h3 { margin: 0; font-size: 15px; }
body.fb .fbm-data .fbm-conn-h .hint { font-size: 12.5px; }
body.fb .fbm-data .fbm-conn p { margin: 0; font-size: 13.5px; }
body.fb .fbm-data .fbm-conn details summary { font-weight: 600; font-size: 13.5px; cursor: pointer; }
body.fb .fbm-data .fbm-conn-f { margin-top: auto !important; padding-top: 4px; }
body.fb .fbm-data .fbm-conn-f button, body.fb .fbm-data .fbm-conn-f .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
body.fb .fbm-data .fbm-hook { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; margin: 8px 0; }
body.fb .fbm-data .code-row { border-top: 1px solid var(--hair); padding: 12px 0; }
body.fb .fbm-data .code-row:first-of-type { border-top: 0; }
body.fb .fbm-data details > summary { cursor: pointer; }

/* Tighter filter tabs and one-line status pills in tables */
body.fb .fbm .seg a { text-transform: none; letter-spacing: 0; padding: 6px 12px; font-size: 13px; font-family: var(--body); white-space: nowrap; }
body.fb .fbm table.fbm-t td .pill { white-space: nowrap; }
body.fb .fbm table.fbm-t th { white-space: nowrap; }
