:root {
  --bg: #f3f5f7; --surface: #ffffff; --ink: #17222c; --muted: #5a6875; --line: #d5dce2;
  --accent: #1f5f8b; --accent-ink: #ffffff; --accent-soft: #e3eef6;
  --warn-bg: #fff4d6; --warn-ink: #6b4a00; --error-bg: #fdecea; --error-ink: #8a1c13; --info-bg: #e9f2f8; --info-ink: #1d4664;
  --demo-bg: #5b1a7a; --demo-ink: #ffffff;
  --radius: 8px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12181d; --surface: #1b232a; --ink: #e6edf2; --muted: #9aa8b4; --line: #2f3b45;
    --accent: #6fb1e0; --accent-ink: #0d1a24; --accent-soft: #1f3343;
    --warn-bg: #3d3112; --warn-ink: #f5d98b; --error-bg: #42201d; --error-ink: #ffb4aa; --info-bg: #1c3040; --info-ink: #b7d8f0;
    --demo-bg: #c79bdd; --demo-ink: #1c0a26; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 6px 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-banner { background: var(--demo-bg); color: var(--demo-ink); padding: 10px 16px; text-align: center; font-weight: 500; letter-spacing: .01em; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 17px; }
.brand .brand-logo { display: block; width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; border-radius: 10px; }
.brand .scope { font-weight: 500; color: var(--muted); font-size: 14px; }
.identity { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.page { max-width: 1240px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.signin { max-width: 460px; margin: 32px auto; display: grid; gap: 14px; }
h1 { margin: 0; font-size: 24px; } h2 { margin: 0 0 8px; font-size: 18px; } h3 { margin: 0; font-size: 16px; }
.field { display: grid; gap: 4px; } label { font-weight: 600; font-size: 14px; }
/* 16px text stops iPhone Safari from zooming into focused fields; 44px is the minimum comfortable touch target. */
input, select { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); padding: 9px 10px; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
button { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 9px 16px; min-height: 44px; border-radius: 6px; touch-action: manipulation; }
button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: transparent; border-color: transparent; color: var(--accent); padding: 9px 0; text-decoration: underline; }
.muted { color: var(--muted); } small { font-size: 13px; } .mono { font-family: var(--mono); font-size: 12px; }
.notice { margin: 0; padding: 10px 12px; border-radius: 6px; }
.notice.info { background: var(--info-bg); color: var(--info-ink); }
.notice.warning { background: var(--warn-bg); color: var(--warn-ink); }
.notice.error { background: var(--error-bg); color: var(--error-ink); }
.notice.error p { margin: 0 0 8px; }
.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.filters { display: grid; gap: 12px; position: sticky; top: 12px; }
@media (max-width: 860px) { .filters { position: static; } }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { flex: 1 1 auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.results > * { min-width: 0; }
.summary-row { display: flex; gap: 8px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.summary { font-weight: 600; margin: 0; flex: 1 1 16em; }
.empty { padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.count { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; margin-bottom: 12px; }
.count-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.badge { font-size: 13px; font-weight: 600; background: var(--line); color: var(--ink); padding: 3px 10px; border-radius: 999px; }
.badge.corrected { background: var(--accent-soft); color: var(--accent); }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 0; }
.meta .id { grid-column: 1 / -1; } .meta .id dd { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.meta dt { font-size: 12px; color: var(--muted); } .meta dd { margin: 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
/* Product names wrap so Product and Quantity both fit on a phone; the less-used columns scroll to the right. */
tbody th { white-space: normal; min-width: 7.5em; max-width: 14em; }
td.qty { font-weight: 700; }
thead th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
tbody th { font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 8px 0; }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.version { width: 100%; text-align: left; display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 400; }
.version.selected { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.version span { overflow-wrap: anywhere; }
.version .reason { white-space: pre-wrap; }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 20px 0; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

@media (max-width: 600px) {
  .page { padding: 12px 12px 48px; }
  .topbar { padding: 10px 12px; }
  .card { padding: 16px; }
  .count { padding: 12px; }
  th, td { padding: 8px 6px; }
  .pager button { flex: 1; }
  .summary-row button { width: 100%; }
}
/* Administrator products page (P1) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
@media (max-width: 600px) { .tabs { width: 100%; } .tabs .tab { flex: 1 1 auto; padding: 9px 10px; } }
button.tab { background: transparent; color: var(--accent); }
button.tab.selected { background: var(--accent); color: var(--accent-ink); }
.packaging { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 0; min-width: 0; }
.packaging legend { font-weight: 600; padding: 0 4px; }
.field.checkbox label { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.field.checkbox input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 1px 0 0; padding: 0; }
.preview { font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.compare { display: grid; gap: 8px; }
pre.mono { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; margin: 8px 0 0; }
td.wrap { white-space: normal; min-width: 12ch; }
.compare th, .compare td { white-space: normal; overflow-wrap: anywhere; }
.env-banner { padding: 8px 20px; background: var(--info-bg); color: var(--info-ink); text-align: center; overflow-wrap: anywhere; }
.env-banner.pilot { background: #b45309; color: #fff; }
.packing-fields { display: grid; gap: 12px; }
.packing-fields[hidden] { display: none; }
label.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.choice input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 1px 0 0; padding: 0; }
label.choice span { display: grid; gap: 2px; }
.setting { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.badge.warning { background: var(--warn-bg); color: var(--warn-ink); }

/* Products review example and shared portal navigation. Environment banners retain their original rules. */
.topbar { padding: 20px 32px 0; gap: 20px; align-items: flex-start; box-shadow: 0 1px 3px #132c4010; }
.brand { min-height: 44px; letter-spacing: -.025em; font-size: 21px; flex-wrap: wrap; }

.brand .scope { border-left: 1px solid var(--line); padding-left: 14px; letter-spacing: 0; }
.identity { display: flex; flex: 1 1 100%; gap: 12px 20px; }
.identity > [data-testid="identity"] { margin-left: auto; font-weight: 600; font-size: 13px; }
.identity > .muted { font-size: 12px; }
.identity > button { margin-bottom: 12px; }
.tabs { gap: 4px; align-self: stretch; }
button.tab { border: 0; border-radius: 0; padding: 14px 16px 17px; color: var(--muted); border-bottom: 3px solid transparent; }
button.tab.selected { background: transparent; color: var(--accent); border-bottom-color: var(--accent); }
button.tab:hover { background: var(--accent-soft); color: var(--accent); }
.products-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 12px; }
.products-heading h1 { font-size: 32px; letter-spacing: -.035em; line-height: 1.25; }
.products-heading p { margin: 8px 0 0; }
.products-heading .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--accent); margin: 0 0 8px; }
.product-catalog { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; gap: 0; overflow: hidden; box-shadow: 0 3px 12px #132c4006; }
.product-catalog .summary-row { padding: 20px 24px 8px; }
.product-catalog h2 { margin: 0; }
.product-catalog > .muted { margin: 0; padding: 0 24px 20px; font-size: 13px; }
.product-catalog .table-wrap { border-top: 1px solid var(--line); }
.product-catalog table { min-width: 950px; }
.product-catalog th, .product-catalog td { padding: 17px 20px; vertical-align: top; }
.product-catalog thead { background: var(--bg); }
.product-catalog tbody th { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.product-catalog td:nth-child(2), .product-catalog td:nth-child(5), .product-catalog td:nth-child(6) { white-space: normal; min-width: 150px; }
.product-catalog tbody tr:last-child > * { border-bottom: 0; }
.product-catalog tbody tr:hover { background: var(--accent-soft); }
.product-catalog .loading, .product-catalog .empty { margin: 20px 24px; }
.product-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--bg); color: var(--muted); }
.product-status.active { background: var(--info-bg); color: var(--info-ink); }
.product-create { padding: 24px; border-radius: 12px; }
.product-create form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.product-create form > :is(h2, p, h3, fieldset, .actions, .notice) { grid-column: 1 / -1; }
.product-create form > h2 { margin: 0; }
.product-create form > p.muted { margin: -12px 0 4px; font-size: 13px; }
.product-create .field { gap: 7px; }
.product-create .packaging { padding: 20px; gap: 16px; }
.product-create .preview { background: var(--info-bg); color: var(--info-ink); border-radius: 8px; padding: 16px; }
.product-create .actions { padding-top: 8px; }
.product-create .actions button { flex: 0 1 auto; }
@media (max-width: 1000px) { .identity > [data-testid="identity"] { margin-left: 0; } .tabs { flex-basis: 100%; order: 1; } }
@media (max-width: 600px) {
  .topbar { padding: 16px 12px 0; gap: 10px; }
  .brand .scope { font-size: 12px; }
  .identity { gap: 8px 12px; }
  .identity > button { margin-bottom: 0; margin-left: auto; }
  .identity > .muted { flex-basis: 100%; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs .tab { flex: 0 0 auto; padding: 12px 10px; font-size: 13px; }
  .products-workspace { gap: 20px; }
  .products-heading h1 { font-size: 28px; }
  .product-catalog .summary-row { padding: 16px 16px 8px; }
  .product-catalog > .muted { padding: 0 16px 16px; }
  .product-catalog .summary-row button { width: auto; }
  .product-create { padding: 16px; }
  .product-create form { grid-template-columns: minmax(0, 1fr); }
  .product-create .packaging { padding: 14px; }
}
.topbar > *, .identity, .products-workspace > * { min-width: 0; }

/* Approved portal-wide surfaces, forms and typography. */
small, .mono, pre.mono, .meta dt, thead th, .identity > .muted,
.product-create form > p.muted, .product-catalog > .muted,
.product-catalog tbody th, .product-status { font-size: 14px; }
small { line-height: 1.6; }
.portal-heading { margin: 12px 0 28px; }
.portal-heading h1 { font-size: 32px; letter-spacing: -.035em; line-height: 1.25; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .1em; margin: 0 0 8px; }
.card, .count { border-radius: 12px; padding: 24px; box-shadow: 0 3px 12px #132c4006; }
.results { gap: 20px; }
.results > .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
th, td { padding: 14px 16px; vertical-align: top; }
thead { background: var(--bg); }
tbody tr:hover { background: var(--accent-soft); }
.table-wrap { max-width: 100%; }
.results, .layout > *, .card > *, .count > * { min-width: 0; }
.card .field { margin: 14px 0; gap: 7px; }
.filters { gap: 16px; }
.filters .field { margin: 0; }
.filters .tabs { flex-wrap: wrap; }
.filters .tabs .tab { flex: 1 1 auto; border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.filters .tabs .selected { background: var(--accent-soft); border-color: var(--accent); }
.count { gap: 18px; margin-bottom: 0; }
.count h3 { font-size: 18px; }
.meta { gap: 14px 24px; }
.meta dd { margin-top: 4px; }
.setting { padding-top: 24px; margin-top: 24px; gap: 12px; }
.packaging { padding: 20px; border-radius: 8px; gap: 16px; }
.actions { gap: 12px; }
.actions button { flex: 0 1 auto; }
.signin { max-width: 480px; margin: 48px auto; padding: 32px; gap: 20px; }
.signin h1 { font-size: 28px; letter-spacing: -.025em; }
.signin .field { margin: 0; }
.signin p { margin: 0; }
.product-create-toolbar { display: flex; justify-content: flex-end; }
.product-create form > .field { margin: 0; }
.product-catalog tbody th { overflow-wrap: normal; min-width: 140px; }
[data-testid="lp-page"] > .field { max-width: 520px; }
[data-testid="acct-manage"] > input, [data-testid="acct-manage"] > select { max-width: 520px; }
@media (max-width: 600px) {
  .portal-heading { margin: 12px 0 20px; }
  .portal-heading h1 { font-size: 28px; }
  .card, .count { padding: 16px; }
  .signin { margin: 24px auto; padding: 24px; }
  .dates { grid-template-columns: minmax(0, 1fr); }
  .meta { grid-template-columns: minmax(0, 1fr); }
  .packaging { padding: 14px; }
  .identity > .muted { flex-basis: auto; }
  .identity > button { margin-left: 0; }
  .identity > [data-testid="identity"] { flex-basis: 100%; }
  .actions button { flex: 1 1 auto; }
  .product-create-toolbar button { width: 100%; }
}

/* Reuse existing cards/fields and the responsive table wrapper for administrator setup. */
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.setup-grid .card { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
[data-testid="setup-steps"] { display: grid; gap: 14px; padding-left: 24px; }
[data-testid="setup-review"] { margin-top: 20px; }

/* Category creation is revealed only by Add new category, including inside grid fields. */
.category-new[hidden] { display: none; }
.category-editor { min-width: 170px; }

.connect-devices { max-width: 640px; margin-inline: auto; text-align: center; }
.connect-devices canvas { display:block; width: min(100%,320px); height:auto; margin:16px auto; image-rendering:pixelated; }
.connect-devices ol { text-align:left; max-width:440px; margin:16px auto; }
@media print {
 body:has(#workplace-qr-sheet) * { visibility:hidden; }
 body #workplace-qr-sheet,body #workplace-qr-sheet * { visibility:visible; }
 #workplace-qr-sheet { position:absolute;left:0;top:0;width:100%;max-width:none;box-shadow:none;border:0;break-inside:avoid; }
}

.connect-devices { width:100%; min-width:0; box-sizing:border-box; }
.connect-devices canvas { max-width:100%; }

/* Portal administrator review: compact team lookup and explicit catalog editing. */
.team-toolbar { display:flex; align-items:end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.team-toolbar .field { flex:1 1 260px; max-width:520px; }
.team-filters { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 8px; }
.team-list th, .team-list td { padding-block:12px; }
.team-list table { min-width:590px; }
.team-pages { align-items:center; justify-content:flex-end; margin-top:16px; }
.product-edit { min-width:90px; }
.product-edit summary { color:var(--accent); font-weight:600; cursor:pointer; padding:12px 8px; border-radius:6px; }
.product-edit[open] { min-width:240px; max-width:340px; }
.product-edit[open] > :not(summary) { margin-top:12px; }
.product-edit summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* Private product costs */
.cost-cell { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.cost-editor { border: 1px solid #d5dee8; border-radius: 10px; padding: 16px 20px; margin: 16px 20px 20px; background: #f8fbfe; }
.cost-editor h3 { margin: 0; }
.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 10px 0; }
.cost-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.9rem; }
.cost-grid input, .cost-grid select { width: 100%; box-sizing: border-box; }
.cost-history-table { margin-top: 10px; width: 100%; font-size: 0.9rem; }
.cost-history-table caption { text-align: left; font-weight: 600; padding-bottom: 6px; }

/* Products: compact table with expandable details */
.products-table th[scope="row"] { font-weight: normal; }
.products-table .product-name { font-weight: 700; color: var(--ink, #17334f); }
.products-table .product-sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; color: #5b6f84; margin-top: 2px; }
.products-table .product-actions { text-align: right; white-space: nowrap; }
.products-table .cost-cell { min-width: 0; }
.products-table .cost-sub { font-size: 0.82rem; }
.product-detail-row > td { background: #f8fbfe; padding: 16px 20px 20px; }
.product-detail { display: grid; gap: 16px; }
.product-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 20px; margin: 0; }
.product-facts dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5b6f84; }
.product-facts dd { margin: 2px 0 0; }
.product-settings h3, .product-detail .cost-editor h3 { margin: 0 0 4px; font-size: 1rem; }
.product-detail .cost-editor { margin: 0; }
.products-table { table-layout: fixed; width: 100%; }
.products-table thead th:nth-child(1) { width: 34%; } .products-table thead th:nth-child(2) { width: 18%; }
.products-table thead th:nth-child(3) { width: 26%; } .products-table thead th:nth-child(4) { width: 11%; } .products-table thead th:nth-child(5) { width: 11%; }
.products-table .product-name { font-family: inherit; overflow-wrap: anywhere; }
.products-table .cost-cell { align-items: flex-start; }
.products-table .cost-cell button.link { padding: 2px 0; }
.product-settings .field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 640px; margin: 6px 0; }
.product-settings .field select { flex: 1 1 220px; width: auto; }
.product-settings .field button { width: auto; flex: 0 0 auto; }
.product-category-inline { display: none; font-size: 0.82rem; color: #5b6f84; }
.product-settings [hidden], .product-detail [hidden] { display: none !important; }
.product-catalog tbody .product-name { font: 600 15px/1.35 var(--font); color: var(--ink); }
.product-catalog tbody th .product-sku { color: var(--accent); }
/* Phone: each product becomes a card (name, SKU, category, cost on the left; Edit on the right). */
@media (max-width: 640px) {
  .products-table, .products-table tbody, .products-table .product-detail-row, .products-table .product-detail-row > td { display: block; width: auto; }
  .products-table thead { display: none; }
  .products-table tbody { border-bottom: 1px solid var(--line); }
  .products-table .product-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px; }
  .products-table .product-row > * { padding: 0; border: 0; min-width: 0; max-width: none; }
  .products-table .product-row > th { grid-column: 1; }
  .products-table .product-row > td:nth-child(2), .products-table .product-row > td:nth-child(4) { display: none; }
  .products-table .product-row > td.product-cost { grid-column: 1; }
  .products-table .product-row > td.product-actions { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .product-category-inline { display: block; }
  .product-detail-row > td { padding: 12px; }
  .cost-history-table { display: block; overflow-x: auto; }
}
.products-table .product-detail-row[hidden] { display: none !important; }
@media (max-width: 640px) { .products-table, .product-detail, .product-detail .cost-editor { max-width: 100%; box-sizing: border-box; } .product-detail .cost-grid { grid-template-columns: minmax(0, 1fr); } .product-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.products-table .product-detail-row > td, .products-table .product-row > * { white-space: normal; }
.product-catalog table.products-table { min-width: 0; }
.product-catalog tbody th .product-category-inline { font: 13px/1.4 var(--font); color: var(--muted); }

/* Eye icon inside password and PIN fields */
.reveal-wrap { position: relative; display: block; }
.reveal-wrap input { width: 100%; padding-right: 48px; box-sizing: border-box; }
.reveal-wrap .reveal { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted, #3c5068); cursor: pointer; }
.reveal-wrap .reveal:hover, .reveal-wrap .reveal:focus-visible { background: rgba(23, 93, 168, 0.08); color: var(--ink, #17334f); }
.reveal-wrap .reveal:disabled { opacity: 0.4; cursor: default; }

/* API-backed reporting and catalog workspace. */
.report-dashboard{display:grid;gap:22px}.dashboard-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;flex-wrap:wrap}.dashboard-heading h1{font-size:32px;letter-spacing:-.03em}.dashboard-heading p{margin:6px 0}.dashboard-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.dashboard-controls input,.dashboard-controls select{width:auto;max-width:100%}.daily-summary{display:grid;grid-template-columns:1.3fr 1fr;gap:20px;background:linear-gradient(120deg,var(--surface),var(--accent-soft));border-top:4px solid var(--accent)}.daily-counter{display:flex;gap:22px;align-items:center;font-size:clamp(26px,3vw,42px);letter-spacing:-.04em;color:var(--ink)}.daily-counter>span{font-weight:300;color:var(--line)}.summary-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.summary-stat{display:flex;flex-direction:column;gap:12px;text-align:left;background:var(--surface);border-color:var(--line);color:var(--ink);padding:16px}.summary-stat strong{font:700 30px var(--mono)}.summary-stat span{font-size:13px;color:var(--muted)}.scope-explanation{grid-column:1/-1;margin:0;font-size:13px;color:var(--muted)}.daily-summary small{grid-column:1/-1}.status-tabs{display:flex;gap:6px;flex-wrap:wrap}.status-tabs [aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}.status-pill{display:inline-block;font-size:12px;font-weight:700;border-radius:999px;padding:4px 10px;white-space:nowrap}.status-pill.success{background:#e2f4e8;color:#17613a}.status-pill.pending{background:#fff1cc;color:#78530d}.status-pill.neutral{background:var(--bg);color:var(--muted)}.receipt{text-align:left;text-decoration:none!important}.receipt small{display:block;font-weight:400}.report-secondary-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}.activity-card{display:grid;gap:8px}.activity-event{display:grid;gap:4px;padding:13px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;text-align:left;background:transparent}.activity-event span,.activity-event small{font-size:12px;color:var(--muted)}.closing-chart{min-width:0}.chart-selectors{display:grid;grid-template-columns:1fr 1fr;gap:10px}.chart-bars{display:flex;align-items:end;gap:6px;min-height:210px}.chart-point{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:end;gap:8px;border:0;background:transparent;color:var(--ink);padding:4px;min-width:0;font-size:12px}.chart-fill{display:block;width:100%;max-width:40px;background:var(--accent);border-radius:5px 5px 0 0}.chart-gap{display:block;width:100%;border-bottom:2px dashed var(--muted)}.chart-point small{font-size:11px}.report-history{margin-top:26px;border-top:1px solid var(--line);padding-top:20px}.report-history>summary{cursor:pointer;font-size:18px;font-weight:700;margin-bottom:20px}.catalog-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.catalog-stats>div{background:var(--accent-soft);border:1px solid var(--line);border-radius:12px;padding:20px;display:grid;gap:8px}.catalog-stats span{font-size:13px;color:var(--muted)}.catalog-stats strong{font:700 30px var(--mono)}.catalog-filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:12px}.catalog-packaging{font-size:13px;color:var(--accent);margin-top:6px}.product-row th{min-width:240px}.product-detail{border-left:4px solid var(--accent);padding:22px!important}.count-converter{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:12px}.converter-fields{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.converter-fields label{flex:1;min-width:130px;display:grid;gap:6px}.converter-fields small{font-weight:400}.converter-result{background:var(--accent-soft);border-radius:10px;padding:16px;margin-bottom:8px;display:grid;gap:8px}.converter-result>span{font-size:11px;letter-spacing:.08em}.converter-result>strong{font:700 28px var(--mono)}
@media(max-width:800px){.report-secondary-grid,.daily-summary{grid-template-columns:1fr}.dashboard-controls{width:100%}.dashboard-controls>*{flex:1;min-width:0}.catalog-filters{grid-template-columns:1fr 1fr}.catalog-filters input{grid-column:1/-1}.catalog-stats{gap:8px}.catalog-stats>div{padding:12px}.summary-stat{padding:12px}.report-dashboard .table-wrap th,.report-dashboard .table-wrap td{min-width:125px}.daily-counter{gap:16px}.catalog-filters button{grid-column:1/-1}}
@media(max-width:450px){.catalog-stats strong{font-size:24px}.summary-stats{gap:6px}.summary-stat span{font-size:11px}.daily-counter{font-size:30px}.chart-selectors{grid-template-columns:1fr}}

.topbar{background:#13294b;color:#fff}.topbar .brand .scope,.topbar .muted{color:#c8d7e8}.topbar button.secondary,.topbar .tab{color:#dce8f5;border-color:#758aa4}.topbar .tab.selected{color:white;border-bottom-color:#8ab9e5}.topbar button:hover{color:#13294b;background:#e6eff8}.product-inspector{position:fixed;inset:0 0 0 auto;margin:0;max-height:100dvh;height:100dvh;width:min(660px,100vw);max-width:100vw;border:0;padding:0;background:var(--bg);color:var(--ink);box-shadow:-12px 0 40px #13294b33}.product-inspector::backdrop{background:#10213977}.product-inspector .product-detail{display:grid;grid-template-columns:minmax(0,1fr);gap:22px;min-height:100%;border:0}.product-inspector .product-settings,.product-inspector .product-facts,.product-inspector .cost-editor{min-width:0}.product-inspector .product-facts{display:grid;grid-template-columns:1fr 1fr;gap:16px;background:var(--surface);padding:18px;border:1px solid var(--line);border-radius:12px}.product-inspector .cost-grid{grid-template-columns:1fr 1fr}.product-detail-row>td{padding:0!important;border:0!important}.lifecycle-preview{border-top:4px solid var(--accent);display:grid;gap:14px}.danger{background:#a72e31;color:white;border-color:#a72e31}
@media(max-width:500px){.product-inspector .product-facts,.product-inspector .cost-grid{grid-template-columns:1fr}.topbar .identity{width:100%}}

.report-dashboard{grid-template-columns:minmax(0,1fr)}.report-dashboard>* ,.report-secondary-grid>* ,.daily-summary>*{min-width:0}.reports-workspace{min-width:0}.report-dashboard .card{max-width:100%}.dashboard-heading>div{min-width:0}.report-dashboard .table-wrap{width:100%;overflow:auto}.status-tabs{max-width:100%}.status-tabs button{width:auto;flex:1 1 auto}.summary-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.summary-stat{min-width:0}.catalog-filters>*{min-width:0}.catalog-overview{min-width:0}@media(max-width:800px){.topbar .tabs{flex-wrap:wrap;overflow:visible;max-width:100%}.topbar .tabs .tab{flex:1 1 auto;white-space:normal}.dashboard-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.dashboard-controls input,.dashboard-controls select{width:100%;min-width:0}.dashboard-controls button{grid-column:1/-1}.daily-counter strong{white-space:nowrap}.report-dashboard .summary-row{min-width:0}.chart-bars .chart-point{width:auto}.status-tabs button{font-size:12px;padding:8px}}

/* Section navigation and compact management actions. */
.page-back{margin-bottom:16px}.compact-action{justify-self:start;align-self:start;width:auto!important;max-width:100%;white-space:normal}

[data-testid=manage-venues]{margin-top:8px;margin-bottom:16px}
.selected-company { display: flex; flex-direction: column; gap: .3rem; padding: .75rem 0; }
.selected-company strong { font-size: 1.15rem; }
.report-print-dialog { width: min(960px,94vw); max-height:90vh; border:1px solid #ccd5df; border-radius:12px; padding:20px; color:#142d44; background:white; }
.report-print-dialog::backdrop { background:#0a213a99; }
.print-controls { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
.print-heading { display:flex; gap:16px; align-items:center; border-bottom:2px solid #142d44; padding-bottom:16px; }
.print-heading h1,.print-heading p { margin:4px 0; }
.report-print-sheet table { width:100%; border-collapse:collapse; min-width:0; }
.report-print-sheet th,.report-print-sheet td { padding:8px; border-bottom:1px solid #cdd5df; text-align:left; overflow-wrap:anywhere; }
.print-count { margin-top:24px; }
.inline-check { display:flex; align-items:center; gap:8px; margin:8px 0; }
.inline-check input { width:auto; }
@media print {
 @page { size:letter portrait; margin:0.6in; }
 body:has(.report-print-dialog) > :not(.report-print-dialog) { display:none !important; }
 .report-print-dialog { display:block !important; position:static; inset:auto; width:100%; max-width:none; height:auto; max-height:none; overflow:visible; border:0; padding:0; margin:0; }
 .report-print-dialog::backdrop,.print-controls { display:none !important; }
 .report-print-sheet { color:#000; font-size:10pt; }
 .print-count + .print-count { break-before:page; }
 .report-print-sheet thead { display:table-header-group; }
 .report-print-sheet tr { break-inside:avoid; }
 .report-print-sheet h2,.print-heading { break-after:avoid; }
}

/* An expanded column picker must scroll normally even on short desktop windows. */
.filters:has(fieldset) { position:static; }
.guided-setup{max-width:1060px;margin:28px auto 48px;color:var(--ink)}.wizard-intro{text-align:center;margin-bottom:32px}.wizard-intro h1{font-size:34px;letter-spacing:-1px;margin:8px 0 12px}.wizard-intro p{font-size:16px}.wizard-steps{list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:0;margin:30px 0 38px}.wizard-steps li{position:relative;text-align:center;color:var(--muted);font-size:14px;font-weight:600;z-index:0}.wizard-steps li:before{content:"";position:absolute;top:20px;left:0;right:0;height:2px;background:var(--line);z-index:-1}.wizard-steps li:first-child:before{left:50%}.wizard-steps li:last-child:before{right:50%}.wizard-steps span{display:grid;place-items:center;width:40px;height:40px;margin:0 auto 10px;border:1px solid var(--line);border-radius:50%;background:var(--bg);box-shadow:0 0 0 7px var(--bg)}.wizard-steps .current span{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.wizard-steps [aria-current]{color:var(--accent)}.wizard-card{border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 10px 35px #16334f08;overflow:hidden}.wizard-columns{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:48px;padding:38px 42px}.wizard-body{min-width:0;font-size:16px}.wizard-body h2{font-size:29px;letter-spacing:-.7px;line-height:1.25;margin-bottom:15px}.wizard-body>p{line-height:1.7}.wizard-body form{display:grid;gap:18px;margin-top:26px}.wizard-body label{font-size:14px}.wizard-body .field{gap:8px}.wizard-body input,.wizard-body select{font-size:16px;min-height:48px}.wizard-body>button{margin:12px 8px 0 0}.wizard-body h2:focus{outline:none}.wizard-aside{align-self:start;position:sticky;top:24px;background:var(--accent-soft);border:1px solid var(--line);border-radius:12px;padding:26px;font-size:16px;line-height:1.7}.wizard-aside h3{margin:0 0 12px}.wizard-aside p{margin:12px 0}.wizard-footer{display:flex;gap:14px;flex-wrap:wrap;align-items:center;border-top:1px solid var(--line);padding:22px 42px}.wizard-footer button{font-size:14px}.wizard-counter{display:flex;gap:10px;align-items:center}.wizard-counter input{width:94px;height:60px;text-align:center;font-size:30px;font-weight:700}.wizard-counter button{width:48px;padding:6px;font-size:23px}.wizard-check{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:9px;padding:12px}.wizard-check input{width:20px;min-height:20px;flex:0 0 20px}.wizard-check small{display:block;font-size:14px;color:var(--muted)}.wizard-body .product-create{border:0;padding:0;background:transparent;box-shadow:none}.wizard-body .product-create h2{font-size:20px}.wizard-body .setup-grid{grid-template-columns:1fr}.wizard-body .meta{grid-template-columns:1fr 1fr}.wizard-body .card{max-width:100%}.wizard-body .packing-fields{padding:16px;background:var(--accent-soft);border-radius:9px}.wizard-body .checkbox input{width:auto}.wizard-body .actions{flex-wrap:wrap}
@media(max-width:720px){.wizard-columns{grid-template-columns:1fr;gap:26px;padding:26px 24px}.wizard-aside{position:static;padding:20px}.wizard-footer{padding:20px 24px;gap:10px}.wizard-intro h1{font-size:28px}.wizard-steps li{font-size:12px}.wizard-steps span{width:34px;height:34px}.wizard-steps li:before{top:17px}.wizard-body h2{font-size:26px}.wizard-body .packing-fields{padding:12px}.wizard-body .actions button{flex:1 1 auto}.wizard-footer button{flex:1 1 auto}.guided-setup{margin-top:16px}}

/* Portal catalog labels: compact actions and wrapping rows on narrow screens. */
.catalog-labels summary { font-weight: 700; cursor: pointer; }
.catalog-label-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-block: 1rem; }
.catalog-label-row input { flex: 1 1 14rem; width: auto; max-width: 32rem; }
.catalog-label-row button { flex: 0 0 auto; width: auto; }
.catalog-label-row [role=status] { flex-basis: 100%; margin: 0; }
.catalog-label-row [role=status]:empty { display: none; }
