/* MeowX for Business portal (restyled 2026-11-06 to the public site's Porcelain look).
   The header, footer, fonts and colours come from the site's own styles (main.css and
   porcelain.css); this file only lays out the portal's cards, forms, lists and tables. */

/* Layout rules below set display; a hidden part must stay hidden. */
[hidden] { display: none !important; }

.bp {
  --bp-ok: #0b7551;
  --bp-ok-bg: #e6f6ef;
  --bp-warn: #8a5300;
  --bp-warn-bg: #fff4e0;
  --bp-bad: #b42318;
  --bp-bad-bg: #fdecea;
}

.bpMain { position: relative; z-index: 1; display: grid; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 48px 24px 96px; }
.bpMain :is(h1, h2, h3) { color: var(--ink); }
.bpMain h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.bpMain .mx-section-label { display: block; margin-bottom: 10px; }

/* Signed out: the title and what the portal is for on the left, the sign-in card on the right.
   On a phone the card comes straight after the title, before the longer explanation. */
.bpAuth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); grid-template-areas: "head card" "more card"; align-items: start; gap: 20px 56px; padding-top: 16px; }
.bpWelcome { grid-area: head; display: grid; gap: 16px; padding-top: 12px; }
.bpWelcome > p { max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.bpAuthCards { grid-area: card; display: grid; }
.bpWelcomeMore { grid-area: more; display: grid; gap: 20px; }
.bpWelcomeList { display: grid; gap: 12px; }
.bpWelcomeList li { position: relative; padding-left: 34px; color: var(--ink-2); font-weight: 500; line-height: 1.6; }
.bpWelcomeList li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-blue); }
.bpWelcomeList li::after { content: ""; position: absolute; left: 7px; top: 8px; width: 8px; height: 5px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.bpWelcomeNew { display: grid; gap: 10px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.bpWelcomeNew > p:first-child { color: var(--muted); font-size: 15px; line-height: 1.6; }
.bpHeadLinks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bpHeadLinks a { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary-2); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Signed in: the portal heading with the developer links beside it. */
.bpDashHead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* Cards, banners and the one-time secret box. */
.bpNarrow { width: 100%; max-width: 520px; justify-self: center; }
.bpAuthCards .bpNarrow { max-width: none; }
.bpCard, .bpItem, .bpBanner, .bpSecret { border: 1px solid var(--line); border-radius: 24px; background: #fff; padding: 28px; }
.bpCard > h2 { margin-bottom: 6px; font-size: 24px; line-height: 1.3; }
.bpBanner { border-color: #f1d29b; background: var(--bp-warn-bg); }
.bpBanner h2, .bpSecret h2 { margin-bottom: 6px; font-size: 20px; }
.bpBanner p, .bpSecret > p { color: var(--ink-2); }
.bpSecret { border: 2px solid #e2a63b; }
.bpHint { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.bpHint:empty { display: none; }
.bpHint a, .bpSwitch a { color: var(--primary-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bpNotice { padding: 14px 18px; border-radius: 16px; background: var(--surface-blue); color: var(--ink-2); font-weight: 500; }
.bpNotice--error { background: var(--bp-bad-bg); color: var(--bp-bad); font-weight: 600; }

/* Forms: the site's input recipe. */
.bpForm { display: grid; gap: 10px; }
.bpCard .bpForm { margin-top: 18px; }
.bpSection > .bpForm.bpCard { max-width: 720px; }
.bpForm h3 { margin-bottom: 4px; font-size: 18px; }
.bpForm label, .bpPicker label, .bpField label, .bpDialog label { color: #34435b; font-size: 14px; font-weight: 600; line-height: 1.5; }
.bpMain :is(input, select), .bpDialog input {
  width: 100%; min-width: 0; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fff; color: var(--text); font-size: 16px; line-height: 1.5;
}
.bpMain input[readonly] { background: var(--bg); }
.bpForm label + input, .bpForm label + select { margin-bottom: 6px; }
.bpChecks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 6px 0; padding: 0; border: 0; }
.bpChecks legend { margin-bottom: 8px; color: #34435b; font-size: 14px; font-weight: 600; }
.bpChecks label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.bpMain .bpChecks input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--primary); }
.bpActions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }

/* Buttons: solid blue for the main action, outlined for the rest, like the site. */
.bpMain button, .bpDialog button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; color: var(--ink-2);
  font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.bpMain button:hover, .bpDialog button:hover { border-color: var(--primary); background: var(--surface-blue); color: var(--primary-2); }
.bpMain button.bpPrimary, .bpDialog button.bpPrimary { border-color: transparent; background: var(--primary); color: #fff; }
.bpMain button.bpPrimary:hover, .bpDialog button.bpPrimary:hover { background: var(--primary-2); color: #fff; }
.bpMain button.bpDanger { border-color: #f0b4ad; color: var(--bp-bad); }
.bpMain button.bpDanger:hover { border-color: var(--bp-bad); background: var(--bp-bad-bg); color: var(--bp-bad); }
.bpMain button.bpLink { min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--primary-2); text-decoration: underline; text-underline-offset: 4px; }
.bpMain button.bpLink:hover { background: none; }
.bpMain button:disabled, .bpMain button:disabled:hover { border-color: transparent; background: #dce4ef; color: #516078; opacity: 1; cursor: not-allowed; }
.bpMain :is(button, input, select, a):focus-visible, .bpDialog :is(button, input):focus-visible, .bpSignOut:focus-visible {
  outline: 3px solid var(--primary-2); outline-offset: 2px;
}
.bpSignOut {
  height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #34435b;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.bpSignOut:hover { background: var(--surface-blue); color: var(--primary-2); }

/* The business area: a side menu of pages, one page at a time (2026-11-07). The site clips sideways
   overflow with overflow-x: hidden, which also stops position: sticky; here the same clipping uses clip,
   so the menu stays in view. */
body.bp, .bpSite { overflow-x: clip; }
.bpBusiness { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 32px; scroll-margin-top: 104px; }
.bpViewNav { position: sticky; top: 112px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.bpViewNav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; color: #34435b; font-weight: 600; text-decoration: none; }
.bpViewNav a:hover { background: var(--surface-blue); color: var(--primary-2); }
.bpViewNav a[aria-current="page"] { background: var(--surface-blue); color: var(--primary-2); }
.bpViews { display: grid; gap: 28px; min-width: 0; }
.bpViews > [data-current="false"] { display: none; }
.bpViews h2[tabindex="-1"]:focus { outline: none; }
.bpQuick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
.bpQuickLink { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 2px 14px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color var(--transition), background var(--transition); }
.bpQuickLink:hover { border-color: var(--primary); background: #fbfcff; }
.bpQuickLink svg { grid-row: span 2; width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: var(--surface-blue); fill: none; stroke: var(--primary-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bpQuickLink strong { font-size: 16px; font-weight: 700; }
.bpQuickLink span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.bpDevelopers { display: grid; gap: 40px; }
.bpDevIntro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; color: var(--muted); }
.bpDevIntro a { color: var(--primary-2); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.bpPicker { display: grid; gap: 6px; max-width: 420px; }
.bpSection { display: grid; gap: 14px; }
.bpSection > h2 { font-size: 24px; line-height: 1.3; }
.bpSection > h3 { margin-top: 8px; font-size: 18px; }
.bpGrid, .bpList { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.bpItem { display: grid; align-content: start; gap: 8px; padding: 22px 24px; border-radius: 20px; }
.bpItemHead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bpItemHead h3 { margin: 0 auto 0 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.bpLine { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.bpLineLabel { margin-right: 6px; color: var(--muted); font-weight: 600; }
.bpMono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.bpBadge { padding: 3px 10px; border-radius: 999px; background: #eef2f8; color: #34435b; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.bpBadge--ok { background: var(--bp-ok-bg); color: var(--bp-ok); }
.bpBadge--warn { background: var(--bp-warn-bg); color: var(--bp-warn); }
.bpBadge--bad { background: var(--bp-bad-bg); color: var(--bp-bad); }
.bpBadge--info { background: var(--surface-blue); color: var(--primary-2); }
.bpEmpty { padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font-size: 14px; }
.bpTableWrap { max-width: 100%; overflow-x: auto; }
.bpTable { width: 100%; overflow: hidden; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; font-size: 14px; }
.bpTable th, .bpTable td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.bpTable th { background: var(--surface-blue); color: var(--ink); font-weight: 650; }
.bpTable tr:last-child td { border-bottom: 0; }
.bpFilters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; gap: 12px 14px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.bpField { display: grid; gap: 6px; }
.bpFieldWide { grid-column: span 2; }
.bpFilters .bpActions { margin-top: 0; }
.bpOrdersTable td { vertical-align: top; white-space: normal; }
.bpOrdersTable td:first-child, .bpOrdersTable td:nth-child(3), .bpOrdersTable td:nth-child(5) { white-space: nowrap; }
.bpOrdersTable .bpMono { overflow-wrap: anywhere; }
.bpOrdersTable .bpRef { display: block; font-weight: 600; }
.bpOrdersTable .bpSub { display: block; color: var(--muted); font-size: 12px; }
.bpOrdersTable td.bpWrap { min-width: 160px; }
.bpSwitch { margin-top: 14px; color: var(--muted); font-size: 14px; }

/* New delivery, bulk upload and stores (2026-11-07): the same cards, fields and buttons as the rest. */
.bpQuick #bpQuickBook { grid-column: 1 / -1; border-color: var(--primary); background: var(--surface-blue); }
.bpQuick #bpQuickBook svg { background: var(--primary); stroke: #fff; }
.bpBook { gap: 14px; }
.bpGroup { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 18px 0 0; border: 0; border-top: 1px solid var(--line); }
.bpGroup legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; color: var(--ink); font-size: 18px; font-weight: 700; }
.bpGroup legend + * { clear: both; }
.bpRow3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bpAddress { display: grid; gap: 6px; min-width: 0; }
.bpSuggestions { display: grid; gap: 2px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; box-shadow: 0 14px 32px rgba(7, 17, 27, .08); }
.bpMain button.bpSuggestion { display: grid; justify-content: start; justify-items: start; gap: 2px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 10px; text-align: left; }
.bpSuggestion strong { color: var(--ink); font-size: 15px; font-weight: 650; }
.bpSuggestion span { color: var(--muted); font-size: 13px; font-weight: 500; }
.bpChosen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 10px 10px 16px; border: 1px solid #b9e3cf; border-radius: 12px; background: var(--bp-ok-bg); color: var(--ink); font-weight: 600; line-height: 1.5; }
.bpChosen > span { position: relative; padding-left: 26px; overflow-wrap: anywhere; }
.bpChosen > span::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 2px solid var(--bp-ok); border-bottom: 2px solid var(--bp-ok); transform: rotate(-45deg); }
.bpCheck { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; color: var(--ink-2); font-weight: 500; line-height: 1.5; }
.bpMain .bpCheck input { flex: 0 0 auto; width: 20px; height: 20px; min-height: 0; margin-top: 2px; padding: 0; accent-color: var(--primary); }
.bpProblem { color: var(--bp-bad); font-size: 14px; font-weight: 600; line-height: 1.6; }
.bpProblem:empty { display: none; }
.bpMain [aria-invalid="true"] { border-color: var(--bp-bad); box-shadow: 0 0 0 3px var(--bp-bad-bg); }
.bpQuoteCard { display: grid; gap: 4px; max-width: 720px; border: 2px solid var(--primary); }
.bpQuotePrice { color: var(--ink); font-size: 30px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.bpDone { display: grid; gap: 10px; max-width: 720px; border-color: #b9e3cf; background: #f6fcf9; }
.bpDone h3 { font-size: 22px; }
.bpDone h3:focus { outline: none; }
.bpCopyRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.bpSteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bpStep { display: grid; align-content: start; gap: 10px; padding: 22px; }
.bpStep h3 { font-size: 17px; line-height: 1.4; }
.bpStep .bpActions { margin-top: 0; }
.bpBulkReview { display: grid; gap: 12px; }
.bpRouteCard { display: grid; gap: 6px; border-color: #c9d8ff; background: var(--surface-blue); }
.bpRouteHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.bpRouteHead h3 { font-size: 18px; }
.bpMain .bpRouteHead select { width: auto; min-height: 44px; padding: 8px 12px; }
.bpRouteLine { color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.55; }
.bpRouteCard .bpHint a { color: var(--primary-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bpFieldLabel { color: #34435b; font-size: 14px; font-weight: 600; line-height: 1.5; }
.bpFilePick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bpMain input.bpFileInput { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; }
.bpFileButton { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; color: var(--ink-2); font-size: 15px; font-weight: 600; cursor: pointer; }
.bpFileButton:hover { border-color: var(--primary); background: var(--surface-blue); color: var(--primary-2); }
.bpFileInput:focus-visible + .bpFileButton { outline: 3px solid var(--primary-2); outline-offset: 2px; }
.bpFileInput:disabled + .bpFileButton { border-color: transparent; background: #dce4ef; color: #516078; cursor: not-allowed; }
.bpFileName { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.bpBulkSummary { color: var(--ink); font-weight: 650; }
.bpBulkTable td { vertical-align: top; white-space: normal; }
.bpBulkTable td:first-child { width: 56px; color: var(--muted); }
.bpBulkTable a { color: var(--primary-2); font-weight: 600; }
.bpRow--fix td:last-child, .bpRow--failed td:last-child { color: var(--bp-bad); font-weight: 600; }
.bpRow--booked td:last-child, .bpRow--priced td:last-child, .bpRow--ready td:last-child { color: var(--bp-ok); font-weight: 600; }

.bpDialogBackdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(7, 17, 27, .5); }
.bpDialogBackdrop[hidden] { display: none; }
.bpDialog { display: grid; gap: 12px; width: min(480px, 100%); padding: 28px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); }
.bpDialog h2 { font-size: 22px; }
.bpDialog p { color: var(--muted); }
.bpVisuallyHidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1040px) {
  .bpBusiness { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .bpSteps { grid-template-columns: minmax(0, 1fr); }
  .bpViewNav { position: static; display: flex; overflow-x: auto; padding: 6px; gap: 4px; }
  .bpViewNav a { flex: 0 0 auto; }
  .bpAuth { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "card" "more"; gap: 24px; }
  .bpWelcome { padding-top: 0; }
}
@media (max-width: 760px) {
  .bpMain { gap: 20px; padding: 28px 20px 64px; }
  .bpSignOut { height: 48px; padding: 0 10px; }
  .bpCard, .bpBanner, .bpSecret { padding: 22px; }
  .bpGrid, .bpList, .bpQuick { grid-template-columns: minmax(0, 1fr); }
  .bpFieldWide { grid-column: auto; }
  .bpOrdersTable thead { display: none; }
  .bpOrdersTable, .bpOrdersTable tbody, .bpOrdersTable tr, .bpOrdersTable td { display: block; width: 100%; }
  .bpOrdersTable tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .bpOrdersTable tr:last-child { border-bottom: 0; }
  .bpOrdersTable td, .bpOrdersTable td:first-child, .bpOrdersTable td:nth-child(5) { padding: 3px 14px; border: 0; white-space: normal; min-width: 0; }
  .bpOrdersTable td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
  .bpRow3, .bpCopyRow { grid-template-columns: minmax(0, 1fr); }
  /* On a phone each row is a short card: "#3 ORDER-1002", the recipient, the address, then price and status. */
  .bpBulkTable thead { display: none; }
  .bpBulkTable, .bpBulkTable tbody { display: block; width: 100%; }
  .bpBulkTable tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .bpBulkTable tr:last-child { border-bottom: 0; }
  .bpBulkTable td, .bpBulkTable td:first-child { display: block; width: auto; padding: 0; border: 0; white-space: normal; }
  .bpBulkTable td:first-child::before { content: "#"; }
  .bpBulkTable td:nth-child(2) { font-weight: 650; }
  .bpBulkTable td:nth-child(3), .bpBulkTable td:nth-child(4) { flex: 0 0 100%; }
  .bpBulkTable td:nth-child(4) { color: var(--muted); }
  .bpBulkTable td.bpCellEmpty { display: none; }
}
