:root {
  color-scheme: light;
  --text: #111111;
  --muted: #7a7a7a;
  --soft: #a3a3a3;
  --surface: #ffffff;
  --status-dot-size: 8px;
  font-family: Onest, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--text); background: #ffffff; }
button, input { font: inherit; }
button { cursor: pointer; }
.mobile-bottom-navigation { display: none; }
.mobile-home-action { display: none; }

.persistent-header { position: relative; padding: clamp(7rem, 18vh, 12.5rem) 1.5rem 0; }
.header-content { width: min(100%, 780px); margin: 0 auto; }
.brand { display: block; margin: 0 auto 3.1rem; color: var(--text); font-size: 2.25rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; text-align: center; }
.pilot-indicator { color: var(--muted); font-size: .36em; font-weight: 500; letter-spacing: 0; vertical-align: baseline; }
.command-bar { display: flex; align-items: center; gap: .8rem; min-height: 3.25rem; padding: 0 .8rem 0 1rem; border: 1px solid #e6e6e6; border-radius: 9999px; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 3%), 0 8px 24px rgb(0 0 0 / 5%); transition: border-color 150ms ease, box-shadow 150ms ease; }
.command-bar:hover { border-color: #a3a3a3; }
.command-bar:focus-within { border-color: #525252; box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 10px 28px rgb(0 0 0 / 6%); }
.search-icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 1.8; }
.command-bar input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: clamp(1rem, 2vw, 1.08rem); font-weight: 400; line-height: 1.5; }
.command-bar input::placeholder { color: var(--soft); opacity: 1; }
.command-bar input[type="search"]::-webkit-search-cancel-button { appearance: none; }
.clear-action { display: grid; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; place-items: center; padding: 0; border: 0; color: var(--text); background: transparent; font-size: 1.25rem; font-weight: 400; line-height: 1; }
.clear-action:hover, .clear-action:focus-visible { color: #000; outline: 0; }
.clear-action[hidden] { display: none; }
.sign-in-link { position: fixed; z-index: 3; top: 1.9rem; inset-inline-end: 1.9rem; color: var(--muted); font-size: .82rem; font-weight: 400; text-decoration: none; }
.sign-in-link:hover, .sign-in-link:focus-visible { color: var(--text); text-decoration: none; }

.workspace { width: min(calc(100% - 3rem), 780px); margin: 0 auto; }
.search-results { margin-top: .6rem; }
.result-list { display: grid; }
.result { position: relative; display: flex; align-items: center; width: 100%; padding-block: .25rem; padding-inline: 3.15rem .9rem; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: start; }
.result + .result { margin-top: 1.25rem; }
.result:focus-visible { outline: 0; }
.result-copy { position: relative; min-width: 0; }
.result.is-selected .result-copy::before { position: absolute; top: 0; bottom: 0; inset-inline-start: -.875rem; width: 2px; border-radius: 1px; background: #111111; content: ""; }
.object-name { display: block; overflow: hidden; color: #111111; font-size: .93rem; font-weight: 600; letter-spacing: -.012em; text-overflow: ellipsis; white-space: nowrap; }
.location-path { display: block; overflow: hidden; margin-top: .12rem; color: #7a7a7a; font-size: .77rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.empty-results { margin: 1.1rem 0 0; color: #7a7a7a; font-size: .85rem; text-align: center; }

.part-number-workspace--has-more .object-workspace { padding-bottom: 0; }
.more-hus-action { display: block; margin-block-start: 2rem; margin-inline-start: 3.15rem; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: .85rem; font-weight: 400; text-align: start; }
.more-hus-action:hover, .more-hus-action:focus-visible { color: var(--text); }
.part-number-hu-list { margin-top: 2rem; }
.part-number-hu-result { align-items: flex-start; padding-top: 0; padding-bottom: 0; }
.part-number-hu-result + .part-number-hu-result { margin-top: 2rem; }
.part-number-hu-result-copy { display: grid; gap: .25rem; }
.hu-number { color: #111111; font-size: 1rem; font-weight: 600; letter-spacing: -.012em; }
.current-position { color: #222222; font-size: .9rem; font-weight: 400; }
.destination { color: var(--muted); font-size: .86rem; font-weight: 400; }

.object-search-results { margin-top: .6rem; }
.object-search-group + .object-search-group { margin-top: 2rem; }
.object-search-group-title { margin: 0 0 .55rem 3.15rem; color: var(--muted); font-size: .76rem; font-weight: 500; }
.object-search-result {
  align-items: flex-start;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 8px;
  transition: background-color 140ms ease;
}
.object-search-result.is-selected { background: #fafafa; }
@media (hover: hover) and (pointer: fine) {
  .object-search-result:hover { background: #f7f7f7; }
}
.object-search-group .object-search-result + .object-search-result { margin-top: .55rem; }
.object-search-value { display: block; color: #111111; font-size: .98rem; font-weight: 600; letter-spacing: -.012em; }

.object-workspace { width: 100%; padding: 4rem 0 6rem 3.15rem; }
.workspace-header { display: grid; gap: .5rem; margin: 0 0 3rem; }
.workspace-object-type { margin: 0; color: #111111; font-size: clamp(1.375rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.2; }
.workspace-object-name { margin: 0; color: #111111; font-size: .9rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.workspace-fields { display: grid; gap: 2rem; margin: 0; }
.workspace-field { display: grid; gap: .4rem; }
.workspace-field dt { color: var(--muted); font-size: .76rem; font-weight: 400; }
.workspace-field--handling-unit dt { color: #8c8c8c; }
.workspace-field dd { margin: 0; color: #111111; font-size: 1rem; font-weight: 500; letter-spacing: -.012em; line-height: 1.45; }
.hu-identifier { display: inline-flex; align-items: center; gap: 8px; }
.hu-identifier-value { color: #111111; font-weight: 600; }
.identifier-quantity { display: inline-flex; align-items: center; gap: 12px; }
.identifier-quantity__leading { display: inline-flex; align-items: center; gap: 8px; }
.identifier-quantity__identifier { color: #111111; font-weight: 600; }
.identifier-quantity__separator { color: #bdbdbd; font-weight: 400; }
.identifier-quantity__quantity { color: #6f6f6f; font-weight: 400; }
.object-workspace .identifier-quantity__leading { position: relative; gap: 0; }
.object-workspace .identifier-quantity__leading .supply-status-marker { position: absolute; inset-inline-end: calc(100% + 11px); }
.identifier-quantity--result-grid { display: grid; grid-template-columns: var(--status-dot-size) 120px max-content max-content; column-gap: 12px; align-items: center; }
.identifier-quantity__marker { display: grid; width: var(--status-dot-size); height: var(--status-dot-size); place-items: center; }

@media (max-width: 767px) {
  .identifier-quantity--result-grid { grid-template-columns: var(--status-dot-size) minmax(0, 1fr) max-content max-content; }
  .identifier-quantity--result-grid .identifier-quantity__identifier { min-width: 0; overflow-wrap: anywhere; }
}
.supply-status-marker { width: var(--status-dot-size); height: var(--status-dot-size); flex: 0 0 auto; border-radius: 50%; }
.supply-status-marker--ready { background: #3f9b5f; }
.supply-status-marker--not-ready { background: #c84c4c; }
.supply-status-marker--warning { background: #c89a36; }

.app--object .persistent-header { position: fixed; z-index: 2; top: 0; inset-inline: 0; padding: 1.5rem; background: #ffffff; }
.app--object .brand { display: none; }
.app--object .header-content { width: min(calc(100% - 3rem), 48rem); }
.app--object .workspace { width: min(calc(100% - 3rem), 48rem); padding-top: 7.5rem; }

:focus-visible { outline: 2px solid #111111; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 767px) {
  body { min-height: 100dvh; overflow: hidden; }
  .app { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; min-height: 100dvh; overflow: hidden; }
  .persistent-header,
  .app--object .persistent-header {
    position: relative;
    z-index: 3;
    padding: calc(env(safe-area-inset-top) + .85rem) 1rem .75rem;
    background: #ffffff;
  }
  .header-content,
  .app--object .header-content { width: 100%; max-width: none; }
  .brand,
  .app--object .brand { display: block; margin: 0 0 .7rem; font-size: 1.05rem; text-align: start; }
  .sign-in-link { display: none; }
  .workspace,
  .app--object .workspace {
    width: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0 1rem calc(5rem + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto;
  }
  .object-workspace { padding: 2rem 1rem 3rem; }
  .workspace-header { margin-bottom: 2.5rem; }
  .workspace-object-name,
  .workspace-field dd { overflow-wrap: anywhere; }
  .result { min-height: 44px; padding-inline: 1.75rem .5rem; }
  .result.is-selected .result-copy::before { inset-inline-start: -.625rem; }
  .object-search-group-title,
  .more-hus-action { margin-inline-start: 1.75rem; }
  .part-number-hu-result { min-height: 44px; }
  .mobile-bottom-navigation {
    position: fixed;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(4rem + env(safe-area-inset-bottom));
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid #ededed;
    background: #ffffff;
  }
  .mobile-bottom-navigation--pilot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-nav-item {
    display: grid;
    min-width: 0;
    min-height: 44px;
    place-items: center;
    align-content: center;
    gap: .15rem;
    padding: .25rem;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: .68rem;
    font-weight: 500;
    line-height: 1.1;
  }
  .mobile-nav-item svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
  .mobile-nav-item.is-active { color: var(--text); }
  .app--home .persistent-header,
  .app--scanner .persistent-header {
    padding-top: calc(env(safe-area-inset-top) + clamp(5.5rem, 16vh, 8.5rem) - 90px);
    padding-bottom: 0;
  }
  .app--home .brand,
  .app--scanner .brand { margin-bottom: calc(clamp(4.25rem, 10vh, 5.25rem) - 2.5rem); font-size: clamp(1.5rem, 7.2vw, 1.86rem); text-align: center; }
  .app--home .brand-flow,
  .app--scanner .brand-flow { color: inherit; }
  .app--home .workspace { display: flex; align-items: flex-end; }
  .mobile-home-action {
    display: block;
    width: 100%;
    margin: 0 0 .75rem;
  }
  .mobile-scan-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.25rem;
    gap: .75rem;
    padding: 0;
    border: 0;
    border-radius: .85rem;
    color: #ffffff;
    background: #18a94c;
    font-size: .9rem;
    font-weight: 600;
  }
  .mobile-scan-action svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
  .scanner-workspace { display: grid; grid-template-rows: auto auto; align-content: start; min-height: 100%; padding: 1.25rem 0; }
  .scanner-torch { position: absolute; right: 2px; bottom: 2px; display: grid; width: 52px; height: 52px; place-items: center; padding: 0; border: 0; color: #ffffff; background: transparent; }
  .scanner-torch[hidden] { display: none; }
  .scanner-torch[aria-pressed="true"] { color: #ffd60a; }
  .scanner-torch svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
  .scanner-close { position: absolute; top: 5px; right: 5px; display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; color: #ffffff; background: transparent; }
  .scanner-close svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.75; }
  .scanner-viewport { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid #e6e6e6; border-radius: 1rem; background: #fafafa; }
  .scanner-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #fafafa; }
  .scanner-video--mirrored { transform: scaleX(-1); }
  .scanner-copy { display: grid; justify-items: center; gap: .45rem; padding-top: 1.5rem; text-align: center; }
  .scanner-copy p { margin: 0; color: var(--text); font-size: 1rem; font-weight: 600; }
  .scanner-status { color: var(--muted) !important; font-size: .75rem !important; font-weight: 400 !important; }
  .scanner-status[data-kind="error"] { color: var(--muted) !important; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
