/* AHSOFT Inventory mobile — presentation only.
   Reuses the shared .mobile-app design tokens and .mobile-app__* components.
   No business logic, permissions, validation or API rules live here. */
@media (max-width: 767px) {
  /* Icon-only back button: title stays on the left, arrow on the right. */
  .mobile-app .mobile-inv__back:not([hidden]) {
    width: 36px; min-width: 36px; padding: 0 !important;
    font-size: 20px; line-height: 1;
  }

  /* Inventory Home launcher grid. */
  .mobile-inv__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mobile-space-2); }
  .mobile-inv__tile {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--mobile-space-2);
    padding: var(--mobile-space-3); border: 1px solid #c8dce2; border-radius: var(--mobile-radius-lg);
    background: #fff; color: #073d52; text-decoration: none; box-shadow: 0 2px 8px rgba(7,44,59,.05);
    min-height: 58px;
  }
  .mobile-inv__tile-icon { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; color: #0b607b; }
  .mobile-inv__tile-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-inv__tile-label { font-size: var(--mobile-font-md); font-weight: 700; line-height: var(--mobile-line-tight); overflow-wrap: anywhere; }

  /* Compact status badges reused across inventory documents. */
  .mobile-inv__badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: var(--mobile-font-2xs); font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    border: 1px solid transparent; white-space: nowrap;
  }
  .mobile-inv__badge--draft { background: #eef2f4; color: #4a5b62; border-color: #d3dee2; }
  .mobile-inv__badge--open { background: #e7f1fb; color: #14508a; border-color: #bcd7f2; }
  .mobile-inv__badge--posted, .mobile-inv__badge--done { background: #e6f5ec; color: #1c6b3a; border-color: #bfe6cd; }
  .mobile-inv__badge--closed { background: #f0ece6; color: #7a5a2f; border-color: #e2d3bd; }
  .mobile-inv__badge--cancel, .mobile-inv__badge--void { background: #fbecea; color: #a12b23; border-color: #f1c9c4; }
  .mobile-inv__badge--warn { background: #fdf3e2; color: #9a6a12; border-color: #f2ddb5; }

  /* Document list cards. */
  .mobile-inv__doc-card { display: grid; gap: 6px; padding: var(--mobile-space-3); }
  /* When the card is a tappable button, keep its content left-aligned like the
     read-only article variant. */
  button.mobile-inv__doc-card { width: 100%; text-align: left; font-family: inherit; color: inherit; cursor: pointer; }
  .mobile-inv__doc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--mobile-space-2); }
  .mobile-inv__doc-top strong { color: #073d52; font-size: var(--mobile-font-base); overflow-wrap: anywhere; }
  .mobile-inv__doc-meta { display: grid; gap: 2px; color: #59727b; font-size: var(--mobile-font-sm); }
  .mobile-inv__doc-meta span { overflow-wrap: anywhere; }

  /* Key/value summary blocks (e.g. item detail, document header). */
  .mobile-inv__summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mobile-space-2) var(--mobile-space-3); margin: 0; }
  .mobile-inv__summary > div { display: grid; gap: 2px; min-width: 0; }
  .mobile-inv__summary dt { color: #59727b; font-size: var(--mobile-font-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
  .mobile-inv__summary dd { margin: 0; color: #102f3a; font-size: var(--mobile-font-base); overflow-wrap: anywhere; }
  .mobile-inv__summary .mobile-inv__wide { grid-column: 1 / -1; }

  /* Line-item rows inside a document. */
  .mobile-inv__line { display: grid; gap: 4px; padding: var(--mobile-space-2) var(--mobile-space-3); border: 1px solid #dbe7eb; border-radius: var(--mobile-radius); background: #fff; }
  .mobile-inv__line-top { display: flex; justify-content: space-between; gap: var(--mobile-space-2); }
  .mobile-inv__line-top strong { font-size: var(--mobile-font-md); color: #123945; }
  .mobile-inv__line-qty { font-weight: 700; color: #0b607b; white-space: nowrap; }
  .mobile-inv__line-sub { color: #59727b; font-size: var(--mobile-font-sm); }

  /* KPI cards (Inventory Dashboard). */
  .mobile-inv__kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mobile-space-2); }
  .mobile-inv__kpi {
    display: grid; gap: 2px; padding: var(--mobile-space-3);
    border: 1px solid #c8dce2; border-radius: var(--mobile-radius-lg); background: #fff;
    box-shadow: 0 2px 8px rgba(7,44,59,.05); border-left: 4px solid #0b607b;
  }
  .mobile-inv__kpi-value { font-size: var(--mobile-font-xl); font-weight: 700; color: #073d52; line-height: var(--mobile-line-tight); overflow-wrap: anywhere; }
  .mobile-inv__kpi-label { font-size: var(--mobile-font-xs); color: #59727b; text-transform: uppercase; letter-spacing: .02em; }
  .mobile-inv__kpi--warn { border-left-color: #d99a1c; }
  .mobile-inv__kpi--orange { border-left-color: #d9701c; }
  .mobile-inv__kpi--red { border-left-color: #c0392b; }
  .mobile-inv__kpi--green { border-left-color: #1c8a4a; }
  .mobile-inv__kpi--neutral { border-left-color: #90a4ac; }

  /* Search row with an optional scan button. */
  .mobile-inv__search-scan { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: var(--mobile-space-2); align-items: center; }
}
