/* Shared navigation and invoice layout fixes for the headquarters web/native shell. */
:root { --hq-safe-top: env(safe-area-inset-top, 0px); }
.grocery-review-link { display: inline-flex; align-items: center; gap: 16px; min-height: 40px; padding: 7px 12px; margin-top: 5px; border: 1px solid #cce4dc; border-radius: 9px; background: #edf7f4; color: #11665f; font-size: 14px; font-weight: 650; text-decoration: none; }
@media(max-width:1180px) and (orientation:portrait), (max-width:900px) {
 html.hq-native-ios { --hq-safe-top: max(env(safe-area-inset-top, 0px), 54px); }
 body:has(#workspace:not(.hidden))::before { content: ''; position: fixed; inset: 0 0 auto; height: calc(var(--hq-safe-top) + 58px); background: #f2f5f8; z-index: 13; pointer-events: none; }
 body.home-launcher-open:has(#workspace:not(.hidden))::before { height: var(--hq-safe-top); }
 .mobile-home-button, body:has(:is(#scanned-invoices-view, #warehouse-invoices-view).active) .mobile-home-button { position: fixed; top: calc(var(--hq-safe-top) + 6px); min-height: 42px; padding: 7px 12px; font-size: 15px; }
 .workspace, body:has(:is(#scanned-invoices-view, #warehouse-invoices-view).active) .workspace { padding-top: calc(var(--hq-safe-top) + 68px); }
 body.home-launcher-open .workspace { padding-top: calc(var(--hq-safe-top) + 8px); }
}
@media(min-width:768px) { html.hq-native-ios { --hq-safe-top: max(env(safe-area-inset-top, 0px), 24px); } }
@media(orientation:landscape) and (max-height:600px) { html.hq-native-ios { --hq-safe-top: env(safe-area-inset-top, 0px); } }
@media(max-width:700px) {
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow: visible; width: 100%; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls .scanned-invoice-filters { display: grid; flex: none; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls :is(input, select) { box-sizing: border-box; max-width: 100%; min-inline-size: 0; width: 100%; font-size: 16px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls .scanned-archive-meta { display: grid; flex: none; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 10px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls .scanned-archive-order { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls .scanned-archive-order button { width: 100%; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-controls .scanned-invoice-summary { height: auto; min-width: 0; flex-wrap: wrap; white-space: normal; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-header .inline-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-header .inline-actions button { width: auto; min-height: 42px; padding: 8px 12px; font-size: 14px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .scanned-archive-header .inline-actions button:first-child { flex: 1; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .invoice-late-toolbar:not(.has-pending) { display: none; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .invoice-late-toolbar { padding: 12px; margin-block: 14px; gap: 8px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .invoice-browser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
 :is(#scanned-invoices-view, #warehouse-invoices-view) .invoice-browser-folder { min-width: 0; }
 .grocery-review-link { max-width: 100%; box-sizing: border-box; font-size: 14px; }
}
