.page-heading, .inline-product .inv-form-product h2 { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: #f5f5f5; cursor: pointer; font-size: 22px; flex-shrink: 0; }
.icon-button:focus-visible, .search-toggle:focus-visible { outline: 2px solid #78a350; outline-offset: 3px; }
.entry-expand { position: relative; }
.entry-expand summary { display: block; list-style: none; color: #78a350; padding-right: 44px; }
.entry-expand summary::-webkit-details-marker { display: none; }
.entry-close { position: absolute; top: 12px; right: 12px; color: #444; }
.inline-product .inv-form-product { grid-template-areas: "name sku qty unit" "cat child image submit" "minimum minimum . ."; }
.inv-a_min { grid-area: minimum; }
.detail-balance { text-align: left; justify-items: start; }
.detail-delete-group { margin-left: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.delete-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.delete-inline input { width: 84px; min-width: 0; height: 38px; border: 1px solid #efb8b8; border-radius: 8px; padding: 8px; }
.delete-inline .inv-btn { height: 38px; padding: 0 12px; }
.minimum-settings { margin: 0 0 18px; padding: 10px 0; color: #555; font-size: 13px; }
.minimum-settings summary { cursor: pointer; }
.minimum-settings form { margin-top: 12px; }
.history-card { border-top-width: 3px; }
.history-card--in { border-top-color: #78A350; }
.history-card--out { border-top-color: #f44336; }
.history-card--adjustment { border-top-color: #8591a3; }
.history-card__top { border-bottom: 1px solid #e8e8e8; padding-bottom: 12px; }
.search-toggle { color: #78a350; gap: 10px; }
.search-toggle > span:not(.search-chevron) { flex: 1; }
.search-toggle::after { display: none; }
.search-chevron { display: flex; transition: transform .18s ease; }
.search-toggle[aria-expanded="true"] .search-chevron { transform: rotate(180deg); }
.head-inner { gap: 16px; }
.head-inner .nav-btn { padding-left: 10px; padding-right: 10px; }

.analytics-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.analytics-toolbar > span { font-size: 14px; color: #777; }
.analytics-toolbar button:disabled { opacity: .5; cursor: default; }
.analytics-alerts { border: 1px solid #eddfba; background: #fffcf5; padding: 20px; border-radius: 14px; margin-bottom: 20px; }
.analytics-alerts h2, .analytics-panel h2 { font-size: 17px; margin: 0 0 8px; }
.analytics-alerts > p, .analytics-panel > p { font-size: 13px; color: #777; line-height: 1.5; margin: 0 0 16px; }
#analytics-low { max-height: none; overflow: visible; }
.low-stock-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #eee3cc; }
.low-stock-row > div { min-width: 0; flex: 1; }
.low-stock-row b { overflow-wrap: anywhere; }
.low-stock-row small { display: block; font-size: 12px; font-weight: 400; color: #777; margin-top: 5px; }
.low-stock-row strong { text-align: right; color: #b66713; }
.low-stock-icon { border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; background: #f7e7c8; color: #a96913; font-weight: 800; flex-shrink: 0; }
.analytics-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card, .analytics-panel { border: 1px solid #e6e6e6; border-radius: 14px; padding: 20px; background: white; min-width: 0; }
.stat-card span { font-size: 13px; color: #777; }
.stat-card strong { display: block; font-size: 30px; margin-top: 12px; }
.analytics-charts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 20px; }
.chart-scroll { overflow-x: auto; }
.timeline-svg { display: block; width: 100%; min-width: 480px; }
.timeline-svg text { font-size: 11px; fill: #777; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #8591a3; }
.unit-chart { margin-bottom: 20px; font-size: 13px; }
.unit-chart > small { color: #777; }
.unit-bar-row { display: grid; grid-template-columns: 58px minmax(0,1fr) minmax(45px,auto); align-items: center; gap: 8px; margin: 10px 0; }
.unit-bar-track { background: #f5f5f5; height: 10px; border-radius: 5px; overflow: hidden; }
.unit-bar-track i { display: block; height: 100%; }
.unit-bar-track .in { background: #78A350; }
.unit-bar-track .out { background: #f44336; }
.analytics-table-wrap { overflow-x: auto; }
.analytics-table-wrap table { min-width: 840px; font-size: 13px; }
.table-sku { display: block; font-size: 11px; color: #777; margin-top: 4px; }
.analytics-empty { font-size: 13px; color: #777; line-height: 1.6; }
#analytics-status:empty { display: none; }

@media (max-width: 850px) {
  body.menu-is-open { overflow: hidden; }
  .head-inner { height: 78px; min-height: 78px; }
  .head-inner nav.open { position: fixed; inset: 78px 0 0; width: 100%; height: calc(100dvh - 78px); background: white; display: flex; flex-direction: column; padding: 14px 12px max(20px,env(safe-area-inset-bottom)); overflow-y: auto; gap: 8px; overscroll-behavior: contain; }
  .head-inner nav .nav-btn { padding: 16px; flex-shrink: 0; }
  .menu-actions { display: grid; gap: 12px; border-top: 1px solid #e6e6e6; padding: 22px 4px 4px; margin-top: auto; }
  .menu-actions .inv-btn { width: 100%; height: 46px; }
  .menu-logout { background: none; border: 0; padding: 12px; color: #777; cursor: pointer; }
  .mobile-menu { display: grid; place-items: center; }
  .detail-head { flex-wrap: wrap; }
  .detail-balance { text-align: left; justify-items: start; }
  .detail-delete-group { justify-self: end; }
  .inline-product .inv-form-product { grid-template-areas: "name sku" "qty unit" "cat child" "image submit" "minimum minimum"; }
  .analytics-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .analytics-charts { grid-template-columns: 1fr; }
  .stat-card, .analytics-panel, .analytics-alerts { padding: 14px; }
  .search-expand #analytics-filter .inv-ctl__q { grid-column: 1 / -1; }
  #analytics-filter > button { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .inline-product .inv-form-product { grid-template-areas: "name" "sku" "qty" "unit" "cat" "child" "image" "minimum" "submit"; }
  .detail-delete-group { grid-row: 1; grid-column: 3; }
  .detail-delete-group:has(.delete-inline:not([hidden])) { grid-row: 3; grid-column: 1 / -1; justify-self: stretch; }
  .delete-inline { flex: 1; }
  .delete-inline input { flex: 1; max-width: 150px; }
  .detail-balance { margin-left: 0; }
  .analytics-toolbar { align-items: stretch; flex-direction: column; }
}
