/* Demo-only inventory and marketing layout refinement.
   Keep all original actions, values, labels and event targets intact. */
@media screen {
  /* The title and its tools form two deliberate rows instead of competing
     for a shrinking strip at desktop zoom and tablet widths. */
  body.app-shell .inv-head .inv-tools,
  body.app-shell[data-nav="ads"] .page-head > .page-actions {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
  }
  body.app-shell .inv-tools > .btn,
  body.app-shell[data-nav="ads"] .page-head > .page-actions > .btn {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 10px 14px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
    text-align: center;
  }
  body.app-shell :is(.inv-tools,.page-actions,.mn-head .act) .btn > .ico {
    flex: 0 0 17px;
  }
  body.app-shell .inv-head > h1,
  body.app-shell[data-nav="inventory"] .page-head > h1 {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  body.app-shell[data-nav="inventory"] .page-head:has(.head-thumb) > h1 {
    flex: 1 1 240px;
  }
  body.app-shell[data-nav="inventory"] .page-head:has(.head-thumb) > .page-actions {
    flex: 1 1 100%;
    min-width: 0;
    margin-left: 0;
    justify-content: flex-start;
  }
  body.app-shell[data-nav="inventory"] .page-head:has(.head-thumb) .btn {
    max-width: 100%;
    white-space: normal;
    height: auto;
    min-height: 44px;
    text-align: center;
  }

  /* A real minimum card width protects complete money values. The tax
     qualifier may use its own line; no amount is clipped or abbreviated. */
  body.app-shell[data-nav="inventory"] .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
    align-items: stretch;
  }
  body.app-shell[data-nav="inventory"] .kpi {
    min-width: 0;
    max-width: 100%;
    padding: 17px;
  }
  body.app-shell[data-nav="inventory"] .kpi .l {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.4;
    margin-bottom: 7px;
  }
  body.app-shell[data-nav="inventory"] .kpi .v {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 5px;
    row-gap: 4px;
    max-width: 100%;
    white-space: nowrap;
    line-height: 1.25;
  }
  body.app-shell[data-nav="inventory"] .kpi.lead .v {
    font-size: clamp(28px, 2.7vw, 36px);
  }
  body.app-shell[data-nav="inventory"] .kpi .v .tax {
    margin-left: 0;
    font-size: 13px;
    line-height: 1.4;
  }
  body.app-shell[data-nav="inventory"] .kpi > .caption,
  body.app-shell[data-nav="inventory"] .kpi > .caption.kpi-fee {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.5;
    margin-top: 6px;
  }

  /* Notes actions wrap as a group, so a full label stays inside the card. */
  body.app-shell .mgr-notes .mn-head {
    align-items: center;
    min-width: 0;
    gap: 10px 16px;
  }
  body.app-shell .mgr-notes .mn-head > h2 {
    flex: 1 1 180px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body.app-shell .mgr-notes .mn-head > .act {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
  }
  body.app-shell .mgr-notes .mn-head .act :is(.btn,form) {
    min-width: 0;
    max-width: 100%;
  }
  body.app-shell .mgr-notes .mn-head .act .btn {
    white-space: normal;
    height: auto;
    min-height: 44px;
    text-align: center;
    overflow-wrap: anywhere;
  }
  body.app-shell .quote-row {
    gap: 8px 12px;
    align-items: center;
  }
  body.app-shell .quote-row > :not(button) {
    min-width: 0;
    flex: 1 1 230px;
    overflow-wrap: anywhere;
  }

  /* Status labels remain readable at their actual content width; two
     columns are used before four cramped controls would truncate text. */
  body.app-shell[data-nav="ads"] .mseg {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
  }
  body.app-shell[data-nav="ads"] .mseg a {
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    gap: 7px;
    line-height: 1.35;
  }
  body.app-shell[data-nav="ads"] .mseg .lbl {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    margin: 0;
  }
  body.app-shell[data-nav="ads"] .mseg .cnt {
    flex: 0 0 auto;
  }
  body.app-shell[data-nav="ads"] .whopost .whosum {
    min-width: 0;
    flex: 1 1 250px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  body.app-shell[data-nav="ads"] .whogrid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  }
  body.app-shell[data-nav="ads"] .qorder + .qsearch {
    margin-block-start: 12px;
  }
  body.app-shell :is(.inv-search,.qsearch) {
    min-width: 0;
    max-width: 100%;
    align-items: stretch;
  }
  body.app-shell :is(.inv-search,.qsearch) > input:not([type="hidden"]) {
    min-width: 0;
    width: 0;
    flex: 1 1 120px;
  }
  body.app-shell :is(.inv-search,.qsearch) > .btn {
    min-height: 44px;
    height: auto;
    line-height: 1.4;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-act,.veh-sub-line) {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }
  body.app-shell[data-nav="inventory"] .inv-sort {
    min-width: 0;
    max-width: 100%;
  }
  body.app-shell[data-nav="inventory"] .inv-sort select {
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
  }
}

@media screen and (max-width: 1100px) {
  body.app-shell[data-nav="ads"] .mseg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 840px) {
  /* Put the longest, task-oriented search action first, then pair the two
     shorter tools. This preserves all original handlers and DOM order. */
  body.app-shell .inv-head .inv-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.app-shell .inv-tools > .btn {
    width: 100%;
    padding: 10px 12px;
  }
  body.app-shell .inv-tools > a[href*="/find"] {
    grid-column: 1 / -1;
    order: -1;
  }
  body.app-shell[data-nav="inventory"] .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.app-shell[data-nav="inventory"] .kpi-grid > .kpi.lead {
    grid-column: 1 / -1;
  }
  body.app-shell[data-nav="inventory"] .kpi {
    padding: 15px;
  }
  body.app-shell[data-nav="inventory"] .kpi.lead .v {
    font-size: 34px;
  }
  body.app-shell[data-nav="inventory"] .kpi:not(.lead) .v {
    font-size: 22px;
  }
  body.app-shell .mgr-notes .mn-head > .act {
    flex: 1 1 100%;
    margin-left: 0;
  }
  body.app-shell .mgr-notes .mn-head .act .btn {
    justify-content: flex-start;
    text-align: left;
  }
  body.app-shell[data-nav="ads"] .page-head > .page-actions > .btn {
    flex: 1 1 130px;
  }
  body.app-shell[data-nav="ads"] #ads-ext {
    flex-basis: 100%;
  }
  body.app-shell[data-nav="ads"] .mseg a {
    padding: 10px 8px;
  }
}

@media screen and (max-width: 380px) {
  body.app-shell[data-nav="inventory"] .kpi:not(.lead) {
    grid-column: 1 / -1;
  }
  body.app-shell[data-nav="inventory"] .kpi.lead .v {
    font-size: 32px;
  }
  body.app-shell[data-nav="inventory"] .page-head:has(.head-thumb) > h1 {
    flex-basis: 160px;
  }
}

/* Marketing: everyday work stays visible; occasional setup sits in quiet Tools. */
@media screen {
  body.app-shell[data-nav="ads"] .page-actions:has(.df-marketing-tools) {
    align-items: center;
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink-2);
    list-style: none;
    cursor: pointer;
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools-toggle::-webkit-details-marker {
    display: none;
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools-toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    flex: 0 0 auto;
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools[open] > summary::after {
    transform: translateY(2px) rotate(225deg);
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools[open] > summary {
    background: var(--surface-3);
    border-color: var(--line);
    color: var(--ink);
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    right: 0;
    width: max-content;
    max-width: min(320px, calc(100vw - 48px));
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-2);
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools-panel #ads-ext {
    display: flex;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border-color: transparent;
    box-shadow: none;
    background: transparent;
    white-space: normal;
    line-height: 1.5;
    text-align: left;
    justify-content: flex-start;
    color: var(--ink-2);
  }
}
@media screen and (max-width: 640px) {
  body.app-shell[data-nav="ads"] .page-actions:has(.df-marketing-tools) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  body.app-shell[data-nav="ads"] .page-actions:has(.df-marketing-tools) > .btn {
    width: 100%;
    height: 100%;
  }
  body.app-shell[data-nav="ads"] .df-marketing-tools {
    align-self: center;
    justify-self: end;
    margin-left: 0;
  }
}
@media (hover: hover) and (pointer: fine) {
  body.app-shell[data-nav="ads"] .df-marketing-tools-toggle:hover,
  body.app-shell[data-nav="ads"] .df-marketing-tools-panel #ads-ext:hover {
    background: var(--surface-3);
    color: var(--ink);
  }
}

/* Inventory controls: keep every existing action visible at its content size.
   Layout only; retain the current palette, labels, form targets and handlers. */
@media screen {
  body.app-shell[data-nav="inventory"] :is(.inv-head .inv-tools, .gv-toolbar, .gv-toggles) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-head .inv-tools, .gv-toolbar) > .btn,
  body.app-shell[data-nav="inventory"] .gv-toggles .gv-tg {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    min-height: 40px;
    height: auto;
    padding: 8px 12px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] .gv-toolbar {
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  body.app-shell[data-nav="inventory"] .gv-toolbar > .gv-toggles { flex: 0 1 auto; }
  body.app-shell[data-nav="inventory"] .gv-toggles > form {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search):has(> a.btn) {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search > input[type="search"], .nc-search .nc-q, .nc-q input[type="search"]) {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    height: auto;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search) > .btn {
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 8px 12px;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
  }
  body.app-shell[data-nav="inventory"] .inv-bar {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-bar > .seg, .nc-seg) {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-bar > .seg, .nc-seg) > a {
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 8px 10px;
    gap: 6px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  body.app-shell[data-nav="inventory"] :is(#inv-chips.chips.tabs, .nc-chips, .fx-group) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  body.app-shell[data-nav="inventory"] #inv-chips.chips.tabs {
    margin: 12px 0;
    padding: 0;
  }
  body.app-shell[data-nav="inventory"] :is(#inv-chips, .nc-chips, .fx-group) > .chip {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    height: auto;
    padding: 8px 12px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] :is(.seg-n, .nc-seg .n, #inv-chips .n, .nc-chips .n, .fx-group .n) {
    flex: 0 0 auto;
    font-size: .88em;
    font-weight: 600;
    line-height: 1.25;
  }
  body.app-shell[data-nav="inventory"] .inv-facets > summary {
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    height: auto;
    gap: 8px;
    padding: 8px 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] .inv-facets :is(.fx-on, .fx-clear) {
    min-width: 0;
    max-width: 100%;
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  body.app-shell[data-nav="inventory"] .fx-group { padding-block: 8px; }
  body.app-shell[data-nav="inventory"] .inv-act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }
  body.app-shell[data-nav="inventory"] .inv-act > .inv-sort {
    flex: 1 1 190px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
  body.app-shell[data-nav="inventory"] .inv-sort > select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    height: auto;
    padding-block: 8px;
    padding-inline-start: 12px;
    padding-inline-end: 36px;
    line-height: 1.35;
    box-sizing: border-box;
  }
}
@media screen and (max-width: 840px) {
  body.app-shell[data-nav="inventory"] .inv-head .inv-tools {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    min-height: 0;
    height: auto;
    align-items: flex-start;
    align-content: flex-start;
  }
  body.app-shell[data-nav="inventory"] .inv-head .inv-tools > .btn {
    flex: 0 1 calc(50% - 4px);
    width: calc(50% - 4px);
    height: auto;
    align-self: flex-start;
  }
  body.app-shell[data-nav="inventory"] .inv-head .inv-tools > a[href*="/find"] {
    flex-basis: 100%;
    width: 100%;
  }
  body.app-shell[data-nav="inventory"] .inv-act {
    width: 100%;
    margin-left: 0;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search) {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    min-height: 0;
    height: auto;
    max-width: none;
  }
  body.app-shell[data-nav="inventory"] .inv-search > input[type="search"],
  body.app-shell[data-nav="inventory"] .nc-search > .nc-q {
    flex: 1 1 140px;
    width: 0;
    height: auto;
    align-self: flex-start;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search) > .btn {
    flex: 0 1 auto;
    width: auto;
    height: auto;
    align-self: flex-start;
  }
}
@media screen and (max-width: 600px) {
  body.app-shell[data-nav="inventory"] :is(.inv-bar > .seg, .nc-seg) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-bar > .seg, .nc-seg) > a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media screen and (max-width: 360px) {
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search):has(> a.btn) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.app-shell[data-nav="inventory"] .inv-search:has(> a.btn) > input[type="search"],
  body.app-shell[data-nav="inventory"] .nc-search:has(> a.btn) > .nc-q {
    grid-column: 1 / -1;
    flex-basis: 100%;
    width: 100%;
  }
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search):has(> a.btn) > .btn {
    flex: 1 1 calc(50% - 4px);
    width: calc(50% - 4px);
  }
}
@media screen and (max-width: 840px), screen and (pointer: coarse) {
  body.app-shell[data-nav="inventory"] :is(.inv-head .inv-tools, .gv-toolbar) > .btn,
  body.app-shell[data-nav="inventory"] .gv-toggles .gv-tg,
  body.app-shell[data-nav="inventory"] :is(.inv-search, .nc-search) > .btn,
  body.app-shell[data-nav="inventory"] :is(.inv-search > input[type="search"], .nc-q input[type="search"]),
  body.app-shell[data-nav="inventory"] :is(.inv-bar > .seg, .nc-seg) > a,
  body.app-shell[data-nav="inventory"] :is(#inv-chips, .nc-chips, .fx-group) > .chip,
  body.app-shell[data-nav="inventory"] .inv-facets > summary,
  body.app-shell[data-nav="inventory"] .inv-sort > select {
    min-height: 44px;
  }
  body.app-shell[data-nav="inventory"] .inv-facets :is(.fx-on, .fx-clear) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Phone categories: one equal-width row, with each count below its label. */
@media screen and (max-width: 600px) {
  body.app-shell[data-nav="inventory"] .inv-bar > .seg {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 4px;
  }
  body.app-shell[data-nav="inventory"] .inv-bar > .seg > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 56px;
    height: auto;
    padding: 7px 1px;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.025em;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    box-sizing: border-box;
  }
  body.app-shell[data-nav="inventory"] .inv-bar > .seg > a:last-child:nth-child(odd) {
    grid-column: auto;
  }
  body.app-shell[data-nav="inventory"] .inv-bar > .seg .seg-n {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
  }
}

/* Documents: compact inventory-only grouping; original forms and file overlay stay intact. */
body.app-shell[data-nav="inventory"] #docs.card { padding: 16px 18px; }
body.app-shell[data-nav="inventory"] #docs > .card-head {
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}
body.app-shell[data-nav="inventory"] #docs > .card-head > h2 {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
body.app-shell[data-nav="inventory"] #docs > .card-head > .spacer { display: none; }
body.app-shell[data-nav="inventory"] #docs > .card-head > form.inline {
  display: flex;
  flex: 1 1 340px;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin-inline-start: auto;
}
body.app-shell[data-nav="inventory"] #docs > .card-head > form.inline > select {
  flex: 1 1 190px;
  width: auto;
  min-width: 0;
  max-width: 100%;
}
body.app-shell[data-nav="inventory"] #docs :is(.btn, select, .filebtn) {
  min-height: 44px;
  height: auto;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.4;
}
body.app-shell[data-nav="inventory"] #docs .btn {
  width: auto;
  padding: 8px 11px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
body.app-shell[data-nav="inventory"] #docs select { padding: 8px 36px 8px 11px; }
body.app-shell[data-nav="inventory"] #docs > .doc-manual {
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 6px;
}
body.app-shell[data-nav="inventory"] #docs > .doc-manual > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body.app-shell[data-nav="inventory"] #docs > .doc-list { margin-bottom: 6px; }
body.app-shell[data-nav="inventory"] #docs .doc-row { min-height: 52px; gap: 8px; padding: 4px 0; }
body.app-shell[data-nav="inventory"] #docs .doc-nm {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
body.app-shell[data-nav="inventory"] #docs > .hint.mb12 {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.45;
}
body.app-shell[data-nav="inventory"] #docs > form > .up-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}
body.app-shell[data-nav="inventory"] #docs > form > .up-row > select {
  flex: 0 1 170px;
  min-width: 0;
  width: auto;
}
body.app-shell[data-nav="inventory"] #docs > form > .up-row > .filebtn {
  flex: 1 1 220px;
  min-width: 0;
  padding: 8px 10px;
}
body.app-shell[data-nav="inventory"] #docs > form > .up-row > .btn { flex: 0 0 auto; }
body.app-shell[data-nav="inventory"] #docs > form > .hint { margin-top: 6px; font-size: 12px; line-height: 1.45; }
@media (max-width: 600px) {
  body.app-shell[data-nav="inventory"] #docs.card { padding: 14px; }
  body.app-shell[data-nav="inventory"] #docs > .card-head > form.inline { flex-basis: 100%; margin-inline-start: 0; }
  body.app-shell[data-nav="inventory"] #docs > .card-head > form.inline > select { flex-basis: 150px; }
  body.app-shell[data-nav="inventory"] #docs > form > .up-row > select { flex: 1 1 100%; width: 100%; }
  body.app-shell[data-nav="inventory"] #docs > form > .up-row > .filebtn { flex: 1 1 120px; }
  body.app-shell[data-nav="inventory"] #docs > form > .up-row > .btn { min-width: 80px; }
}

body.app-shell[data-nav="inventory"] #docs .doc-nm > .pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  padding-block: 3px;
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
@media (max-width: 840px), (pointer: coarse) {
  body.app-shell[data-nav="inventory"] #docs.card select { font-size: 16px; }
}
