:root {
  --hb-green: #0b8a4b;
  --hb-green-dark: #066b3a;
  --hb-green-soft: #e9f8f0;
  --hb-surface: #ffffff;
  --hb-page: #f5f8f6;
  --hb-border: #e0e8e3;
  --hb-text: #122019;
  --hb-muted: #68776f;
  --hb-shadow: 0 10px 30px rgba(18, 32, 25, .055);
}

body.hb-ui-v1 {
  background: var(--hb-page) !important;
  color: var(--hb-text) !important;
  -webkit-font-smoothing: antialiased;
}

body.hb-ui-v1 .ui-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

body.hb-ui-v1 .side {
  width: 224px !important;
  padding: 18px 12px 22px !important;
  border-right: 1px solid var(--hb-border) !important;
  background: rgba(255, 255, 255, .97) !important;
  overflow-y: auto;
  scrollbar-width: thin;
}

body.hb-ui-v1 .main {
  width: calc(100% - 224px) !important;
  margin-left: 224px !important;
}

body.hb-ui-v1 .hb-text-logo {
  min-height: 52px !important;
  margin: 0 6px 20px !important;
  gap: 10px !important;
}

body.hb-ui-v1 .hb-text-mark {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--hb-green-soft) !important;
}

body.hb-ui-v1 .hb-brand-svg {
  width: 40px !important;
  height: 40px !important;
}

body.hb-ui-v1 .hb-text-lines {
  color: var(--hb-green-dark) !important;
  font-size: 17px !important;
  line-height: .95 !important;
  letter-spacing: .2px !important;
  text-shadow: none !important;
}

body.hb-ui-v1 .nav-group-title {
  margin: 16px 10px 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #8a9790 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .11em !important;
}

body.hb-ui-v1 .side .nav a {
  min-height: 42px !important;
  margin: 3px 0 !important;
  padding: 10px 11px !important;
  gap: 10px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #435149 !important;
  box-shadow: none !important;
  transition: background .14s ease, color .14s ease, border-color .14s ease !important;
}

body.hb-ui-v1 .side .nav a .nav-icon {
  width: 20px !important;
  min-width: 20px !important;
  flex: 0 0 20px !important;
  font-size: 0 !important;
  opacity: .82;
}

body.hb-ui-v1 .side .nav a b {
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

body.hb-ui-v1 .side .nav a:hover {
  background: #f1f8f4 !important;
  border-color: #d8ebe0 !important;
  color: var(--hb-green-dark) !important;
  transform: none !important;
}

body.hb-ui-v1 .side .nav a.active {
  background: var(--hb-green) !important;
  border-color: var(--hb-green) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(11, 138, 75, .18) !important;
}

body.hb-ui-v1 .side .nav a.active b,
body.hb-ui-v1 .side .nav a.active span {
  color: #ffffff !important;
}

body.hb-ui-v1 .top {
  min-height: 72px !important;
  height: auto !important;
  padding: 10px 24px !important;
  border-bottom: 1px solid var(--hb-border) !important;
  background: rgba(255, 255, 255, .94) !important;
  backdrop-filter: blur(14px);
  z-index: 25 !important;
}

body.hb-ui-v1 .top-title {
  min-width: 170px;
}

body.hb-ui-v1 .top-title h1 {
  margin: 0 !important;
  color: var(--hb-text) !important;
  font-size: 21px !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em;
}

body.hb-ui-v1 .top-mobile-brand {
  display: none;
}

body.hb-ui-v1 .top .search {
  flex: 1;
  max-width: 560px;
  margin: 0 20px;
}

body.hb-ui-v1 .top .search input {
  width: 100% !important;
  height: 44px !important;
  padding: 0 16px 0 42px !important;
  border: 1px solid var(--hb-border) !important;
  border-radius: 13px !important;
  background-color: #f7faf8 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2368776f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 15px center !important;
  color: var(--hb-text) !important;
  box-shadow: none !important;
}

body.hb-ui-v1 .top .search input:focus {
  border-color: #8bc9a9 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(11, 138, 75, .09) !important;
}

body.hb-ui-v1 .top-actions,
body.hb-ui-v1 .top-user {
  display: flex;
  align-items: center;
}

body.hb-ui-v1 .top-actions {
  gap: 12px;
}

body.hb-ui-v1 .top-user {
  gap: 9px;
  color: var(--hb-text);
}

body.hb-ui-v1 .top-user > span:last-child {
  display: grid;
  gap: 1px;
}

body.hb-ui-v1 .top-user b {
  font-size: 13px;
}

body.hb-ui-v1 .top-user small {
  color: var(--hb-muted);
  font-size: 11px;
}

body.hb-ui-v1 .top-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--hb-green-soft);
  color: var(--hb-green-dark);
  font-weight: 850;
}

body.hb-ui-v1 .top-scan {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #bfe2ce;
  border-radius: 12px;
  background: var(--hb-green-soft);
  color: var(--hb-green-dark);
}

body.hb-ui-v1 .content {
  width: 100% !important;
  max-width: 1700px !important;
  padding: 24px 28px 84px !important;
}

body.hb-ui-v1 .card {
  border: 1px solid var(--hb-border) !important;
  border-radius: 16px !important;
  background: var(--hb-surface) !important;
  box-shadow: var(--hb-shadow) !important;
}

body.hb-ui-v1 .btn {
  border-radius: 12px !important;
  border-color: var(--hb-border) !important;
  box-shadow: none !important;
  font-weight: 750 !important;
}

body.hb-ui-v1 .btn.primary,
body.hb-ui-v1 .btn.btn-primary,
body.hb-ui-v1 button.primary {
  border-color: var(--hb-green) !important;
  background: var(--hb-green) !important;
  color: #ffffff !important;
}

body.hb-ui-v1 input,
body.hb-ui-v1 select,
body.hb-ui-v1 textarea {
  border-color: var(--hb-border) !important;
  border-radius: 12px !important;
}

body.hb-ui-v1 table {
  border-color: var(--hb-border) !important;
}

body.hb-ui-v1 th {
  background: #f6f9f7 !important;
  color: #617168 !important;
}

body.hb-ui-v1 .mobile-bottom-nav,
body.hb-ui-v1 .mobile-more-sheet,
body.hb-ui-v1 .mobile-more-backdrop {
  display: none;
}

body.hb-ui-v1 .mobile-workbench {
  display: none !important;
}

body.hb-ui-v1 .dashboard-desktop .metric {
  border-radius: 16px !important;
  box-shadow: var(--hb-shadow) !important;
}

body.hb-ui-v1 .dashboard-desktop .metric:hover {
  transform: none !important;
  border-color: #bfe2ce !important;
}

body.hb-login-v1 .login-card {
  border-color: var(--hb-border) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 70px rgba(18, 32, 25, .11) !important;
}

body.hb-login-v1 .logo-text {
  color: var(--hb-green-dark) !important;
  text-transform: none !important;
  letter-spacing: -.03em !important;
}

body.hb-login-v1 button[type="submit"] {
  background: var(--hb-green) !important;
  box-shadow: 0 12px 28px rgba(11, 138, 75, .2) !important;
}

@media (max-width: 820px) {
  body.hb-ui-v1 {
    min-width: 0 !important;
    padding: 0 0 calc(74px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
  }

  body.hb-ui-v1.mobile-more-open {
    overflow: hidden !important;
  }

  body.hb-ui-v1 .layout,
  body.hb-ui-v1 .main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.hb-ui-v1 .side {
    display: none !important;
  }

  body.hb-ui-v1 .top {
    position: sticky !important;
    top: 0 !important;
    min-height: 62px !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--hb-border) !important;
    background: rgba(255, 255, 255, .96) !important;
    z-index: 35 !important;
  }

  body.hb-ui-v1 .top-title {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  body.hb-ui-v1 .top-mobile-brand {
    display: block;
    color: var(--hb-green-dark);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  body.hb-ui-v1 .top-title h1 {
    max-width: calc(100vw - 98px);
    margin: 0 !important;
    overflow: hidden;
    color: var(--hb-text) !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.hb-ui-v1 .top .search,
  body.hb-ui-v1 .top-user {
    display: none !important;
  }

  body.hb-ui-v1 .top-actions {
    display: flex !important;
  }

  body.hb-ui-v1 .top-scan {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  body.hb-ui-v1 .content,
  body.hb-ui-v1 section.content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 14px 12px 26px !important;
    overflow-x: hidden !important;
  }

  body.hb-ui-v1 .mobile-head {
    display: none !important;
  }

  body.hb-ui-v1 .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--hb-border);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -10px 30px rgba(18, 32, 25, .08);
    backdrop-filter: blur(16px);
  }

  body.hb-ui-v1 .mobile-bottom-link {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 3px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #738078;
    font: inherit;
    box-shadow: none;
    cursor: pointer;
  }

  body.hb-ui-v1 .mobile-bottom-link .ui-icon {
    width: 21px;
    height: 21px;
  }

  body.hb-ui-v1 .mobile-bottom-link span {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.hb-ui-v1 .mobile-bottom-link.active {
    background: var(--hb-green-soft);
    color: var(--hb-green-dark);
  }

  body.hb-ui-v1 .mobile-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    background: rgba(8, 22, 14, .48);
    backdrop-filter: blur(2px);
  }

  body.hb-ui-v1 .mobile-more-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: block;
    width: auto !important;
    max-width: none !important;
    max-height: min(78vh, 650px);
    margin: 0 !important;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    background: #ffffff;
    box-shadow: 0 -22px 60px rgba(8, 22, 14, .22);
  }

  body.hb-ui-v1 .mobile-more-backdrop[hidden],
  body.hb-ui-v1 .mobile-more-sheet[hidden] {
    display: none !important;
  }

  body.hb-ui-v1 .mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  body.hb-ui-v1 .mobile-more-head > div {
    display: grid;
    gap: 2px;
  }

  body.hb-ui-v1 .mobile-more-head b {
    font-size: 20px;
  }

  body.hb-ui-v1 .mobile-more-head span {
    color: var(--hb-muted);
    font-size: 12px;
  }

  body.hb-ui-v1 .mobile-more-head button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--hb-border);
    border-radius: 13px;
    background: #f6f9f7;
    color: var(--hb-text);
    box-shadow: none;
  }

  body.hb-ui-v1 .mobile-more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  body.hb-ui-v1 .mobile-more-link {
    min-width: 0;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--hb-border);
    border-radius: 15px;
    background: #f8faf9;
    color: var(--hb-text);
  }

  body.hb-ui-v1 .mobile-more-link > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    border-radius: 11px;
    background: var(--hb-green-soft);
    color: var(--hb-green-dark);
  }

  body.hb-ui-v1 .mobile-more-link b {
    min-width: 0;
    font-size: 13px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.hb-ui-v1 .mobile-more-link.active {
    border-color: #8bc9a9;
    background: var(--hb-green-soft);
  }

  body.hb-ui-v1 .mobile-more-install,
  body.hb-ui-v1 .mobile-more-logout {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 13px;
    font-weight: 800;
  }

  body.hb-ui-v1 .mobile-more-install {
    border: 1px solid #bfe2ce !important;
    background: var(--hb-green-soft) !important;
    color: var(--hb-green-dark) !important;
    box-shadow: none !important;
  }

  body.hb-ui-v1 .mobile-more-logout {
    border: 1px solid var(--hb-border);
    color: #9f3232;
    background: #fffafa;
  }

  body.hb-ui-v1 section.mobile-workbench {
    display: block !important;
    margin-bottom: 14px;
  }

  body.hb-ui-v1 .mobile-workbench-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 2px 12px;
  }

  body.hb-ui-v1 .mobile-workbench-head > div {
    display: grid;
    gap: 2px;
  }

  body.hb-ui-v1 .mobile-workbench-head b {
    font-size: 22px;
    letter-spacing: -.02em;
  }

  body.hb-ui-v1 .mobile-workbench-head span {
    color: var(--hb-muted);
    font-size: 13px;
  }

  body.hb-ui-v1 .mobile-search-action {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--hb-border);
    border-radius: 13px;
    background: #ffffff;
    color: var(--hb-text);
  }

  body.hb-ui-v1 .mobile-scan-action {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 10px;
    padding: 14px 16px;
    border-radius: 17px;
    background: var(--hb-green);
    color: #ffffff;
    box-shadow: 0 13px 28px rgba(11, 138, 75, .2);
  }

  body.hb-ui-v1 .mobile-scan-action > .ui-icon {
    width: 28px;
    height: 28px;
  }

  body.hb-ui-v1 .mobile-scan-action > span,
  body.hb-ui-v1 .mobile-action-tile > span {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  body.hb-ui-v1 .mobile-scan-action b,
  body.hb-ui-v1 .mobile-action-tile b {
    line-height: 1.2;
  }

  body.hb-ui-v1 .mobile-scan-action small {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
  }

  body.hb-ui-v1 .mobile-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  body.hb-ui-v1 .mobile-action-tile {
    min-width: 0;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--hb-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--hb-text);
    box-shadow: 0 6px 18px rgba(18, 32, 25, .035);
  }

  body.hb-ui-v1 .mobile-action-tile > .ui-icon {
    width: 25px;
    height: 25px;
    color: var(--hb-green-dark);
  }

  body.hb-ui-v1 .mobile-action-tile small {
    color: var(--hb-muted);
    font-size: 11px;
    line-height: 1.2;
  }

  body.hb-ui-v1 .mobile-inventory-mode {
    margin-top: 9px;
  }

  body.hb-ui-v1 .mobile-inventory-mode form,
  body.hb-ui-v1 .mobile-inventory-mode .btn {
    width: 100% !important;
  }

  body.hb-ui-v1 .mobile-inventory-mode .btn {
    min-height: 46px !important;
    justify-content: center !important;
    border-color: var(--hb-border) !important;
    background: #ffffff !important;
    color: var(--hb-text) !important;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 9px !important;
    margin-bottom: 12px !important;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics .metric {
    min-height: 116px !important;
    display: flex !important;
    align-items: flex-start !important;
    padding: 13px !important;
    margin: 0 !important;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics .metric .icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics .metric .label {
    font-size: 12px !important;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics .metric b {
    margin-top: 5px !important;
    font-size: 25px !important;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics .metric .small {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  body.hb-ui-v1 .card,
  body.hb-ui-v1 .panel,
  body.hb-ui-v1 .box,
  body.hb-ui-v1 .item-card,
  body.hb-ui-v1 .cell-card {
    padding: 14px !important;
    margin-bottom: 12px !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 18px rgba(18, 32, 25, .04) !important;
  }

  body.hb-ui-v1 h1 {
    font-size: 23px !important;
  }

  body.hb-ui-v1 h2 {
    font-size: 20px !important;
  }

  body.hb-ui-v1 .section-tabs {
    padding: 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  body.hb-ui-v1 .section-tabs::-webkit-scrollbar {
    display: none;
  }

  body.hb-ui-v1 .section-tabs .actions {
    min-width: max-content;
    display: flex !important;
    grid-template-columns: none !important;
    gap: 6px !important;
  }

  body.hb-ui-v1 .section-tabs .btn {
    width: auto !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
  }

  body.hb-ui-v1 table.mobile-card-table tr {
    padding: 12px 13px !important;
    border-color: var(--hb-border) !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 15px rgba(18, 32, 25, .035) !important;
  }

  body.hb-ui-v1 table.mobile-card-table td {
    min-width: 0 !important;
    font-size: 14px !important;
  }

  body.hb-ui-v1 .issue-draft-banner {
    top: 66px !important;
  }
}

@media (max-width: 390px) {
  body.hb-ui-v1 .mobile-more-grid,
  body.hb-ui-v1 .mobile-action-grid {
    grid-template-columns: 1fr !important;
  }

  body.hb-ui-v1 .mobile-action-tile {
    min-height: 72px;
  }

  body.hb-ui-v1 .mobile-dashboard-metrics {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (display-mode: standalone) and (max-width: 820px) {
  body.hb-ui-v1 .top {
    padding-top: calc(10px + env(safe-area-inset-top)) !important;
  }
}

/* Interior pages: mobile-first work surfaces */
body.hb-ui-v1 .section-tabs {
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--hb-border);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 5px 18px rgba(18,32,25,.035);
}

body.hb-ui-v1 .section-tabs .actions {
  display: flex;
  gap: 4px;
}

body.hb-ui-v1 .section-tabs .btn {
  min-height: 38px;
  padding: 8px 13px;
  border-color: transparent !important;
  background: transparent !important;
  color: var(--hb-muted) !important;
}

body.hb-ui-v1 .section-tabs .btn.primary,
body.hb-ui-v1 .section-tabs .btn.active {
  border-color: var(--hb-border) !important;
  background: #fff !important;
  color: var(--hb-green-dark) !important;
  box-shadow: 0 5px 14px rgba(18,32,25,.06) !important;
}

body.hb-ui-v1 .workflow-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--hb-green-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.hb-ui-v1 .workflow-hero,
body.hb-ui-v1 .page-intro-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

body.hb-ui-v1 .workflow-hero {
  padding: 24px 26px !important;
  background:
    radial-gradient(circle at 92% 15%, rgba(126,220,170,.24), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f2fbf6 100%) !important;
}

body.hb-ui-v1 .workflow-hero-copy {
  max-width: 760px;
}

body.hb-ui-v1 .workflow-hero h2,
body.hb-ui-v1 .page-intro-bar h2,
body.hb-ui-v1 .workflow-card-title h2 {
  margin: 0;
  color: var(--hb-text);
  letter-spacing: -.025em;
}

body.hb-ui-v1 .workflow-hero p,
body.hb-ui-v1 .page-intro-bar p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--hb-muted);
  line-height: 1.55;
}

body.hb-ui-v1 .workflow-title-row,
body.hb-ui-v1 .workflow-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

body.hb-ui-v1 .workflow-status,
body.hb-ui-v1 .workflow-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #cbe8d7;
  background: #effaf4;
  color: var(--hb-green-dark);
  font-size: 12px;
  font-weight: 850;
}

body.hb-ui-v1 .workflow-status {
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
}

body.hb-ui-v1 .workflow-count {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
}

body.hb-ui-v1 .workflow-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

body.hb-ui-v1 .workflow-hero-actions form {
  display: inline-flex;
}

body.hb-ui-v1 .workflow-hero-actions .btn .ui-icon,
body.hb-ui-v1 .page-intro-bar .btn .ui-icon {
  width: 18px;
  height: 18px;
}

body.hb-ui-v1 .workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 18px;
  align-items: start;
}

body.hb-ui-v1 .workflow-receipt-layout,
body.hb-ui-v1 .inventory-workflow-layout {
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr);
}

body.hb-ui-v1 .workflow-draft-card {
  position: sticky;
  top: 92px;
}

body.hb-ui-v1 .workflow-card-title {
  min-height: 46px;
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--hb-border);
}

body.hb-ui-v1 .workflow-card-title .workflow-kicker {
  margin-bottom: 4px;
}

body.hb-ui-v1 .filter-bar {
  align-items: center;
  padding: 8px;
  border: 1px solid var(--hb-border);
  border-radius: 14px;
  background: #f7faf8;
}

body.hb-ui-v1 .filter-bar input,
body.hb-ui-v1 .filter-bar select,
body.hb-ui-v1 .admin-form input,
body.hb-ui-v1 .admin-form select,
body.hb-ui-v1 .admin-form textarea,
body.hb-ui-v1 .receipt-add-form input,
body.hb-ui-v1 .receipt-add-form select {
  min-height: 44px;
  border-color: var(--hb-border) !important;
  border-radius: 11px !important;
  background: #fff;
  color: var(--hb-text);
  box-shadow: none;
}

body.hb-ui-v1 .filter-bar input:first-child {
  flex: 1 1 300px;
}

body.hb-ui-v1 .filter-bar input:focus,
body.hb-ui-v1 .filter-bar select:focus,
body.hb-ui-v1 .admin-form input:focus,
body.hb-ui-v1 .receipt-add-form input:focus {
  outline: none;
  border-color: #83c6a2 !important;
  box-shadow: 0 0 0 3px rgba(11,138,75,.09);
}

body.hb-ui-v1 .issue-mobile-list {
  display: grid;
  gap: 9px;
}

body.hb-ui-v1 .issue-line {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--hb-border);
  border-radius: 14px;
  background: #fff;
}

body.hb-ui-v1 .issue-line:last-child {
  border-bottom: 1px solid var(--hb-border);
}

body.hb-ui-v1 .issue-line > div:first-child b {
  color: var(--hb-text);
  font-size: 15px;
  line-height: 1.3;
}

body.hb-ui-v1 .issue-line .small {
  color: var(--hb-muted);
  line-height: 1.45;
}

body.hb-ui-v1 .issue-line-edit-form input {
  border-color: var(--hb-border);
  background: #f8faf9;
}

body.hb-ui-v1 .workflow-finish-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hb-border);
}

body.hb-ui-v1 .workflow-finish-form label {
  color: var(--hb-text) !important;
  font-size: 13px;
}

body.hb-ui-v1 .workflow-finish-form .btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

body.hb-ui-v1 .page-intro-bar {
  margin: 0 0 16px;
  padding: 8px 2px 5px;
}

body.hb-ui-v1 .page-intro-bar h2 {
  font-size: 25px;
}

body.hb-ui-v1 .inventory-choice-grid,
body.hb-ui-v1 .admin-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

body.hb-ui-v1 .inventory-choice-card,
body.hb-ui-v1 .admin-hub-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

body.hb-ui-v1 .inventory-choice-card p,
body.hb-ui-v1 .admin-hub-card p {
  color: var(--hb-muted);
  line-height: 1.5;
}

body.hb-ui-v1 .inventory-choice-card form,
body.hb-ui-v1 .inventory-choice-card > .btn,
body.hb-ui-v1 .admin-hub-card > b {
  margin-top: auto;
}

body.hb-ui-v1 .inventory-choice-card form,
body.hb-ui-v1 .inventory-choice-card form .btn {
  width: 100%;
}

body.hb-ui-v1 .inventory-choice-card .btn {
  justify-content: center;
}

body.hb-ui-v1 .workflow-step {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 12px;
  background: var(--hb-green-soft);
  color: var(--hb-green-dark);
  font-size: 12px;
  font-weight: 900;
}

body.hb-ui-v1 .production-hub-card .workflow-step {
  margin-bottom: 10px;
}

body.hb-ui-v1 .production-hub-card p,
body.hb-ui-v1 .production-inventory-kind p {
  color: var(--hb-muted);
  line-height: 1.5;
}

body.hb-ui-v1 .production-inventory-kind {
  position: relative;
  overflow: hidden;
}

body.hb-ui-v1 .production-inventory-kind::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--hb-green);
}

body.hb-ui-v1 .production-inventory-kind input[type=file] {
  min-height: 56px;
  padding: 10px !important;
  border: 1px dashed #a8cdb9 !important;
  border-radius: 12px !important;
  background: #f6fbf8 !important;
}

body.hb-ui-v1 .scanner-card {
  overflow: hidden;
  background: #101814 !important;
  color: #fff;
}

body.hb-ui-v1 .scanner-card h2,
body.hb-ui-v1 .scanner-card .workflow-kicker {
  color: #fff;
}

body.hb-ui-v1 .scanner-card p {
  color: rgba(255,255,255,.68) !important;
}

body.hb-ui-v1 .scanner-card .scan-frame {
  display: grid;
  gap: 12px;
}

body.hb-ui-v1 .scanner-card .scan-video {
  overflow: hidden;
  min-height: 310px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  background: #060a08;
}

body.hb-ui-v1 .scan-status {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  font-size: 13px;
}

body.hb-ui-v1 .scanner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.hb-ui-v1 .scanner-actions .btn {
  min-height: 46px;
  justify-content: center;
  border-color: rgba(255,255,255,.17) !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

body.hb-ui-v1 .protocol-upload-hero {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(430px, 1.2fr);
  gap: 32px;
  align-items: center;
  padding: 32px !important;
  background:
    radial-gradient(circle at 5% 0%, rgba(119,213,162,.25), transparent 32%),
    linear-gradient(135deg, #fff, #f4fbf7) !important;
}

body.hb-ui-v1 .protocol-upload-copy h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.035em;
}

body.hb-ui-v1 .protocol-upload-copy p {
  color: var(--hb-muted);
  line-height: 1.6;
}

body.hb-ui-v1 .protocol-upload-form {
  display: grid;
  gap: 11px;
}

body.hb-ui-v1 .upload-dropzone {
  min-height: 150px;
  display: flex !important;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  padding: 20px;
  border: 1px dashed #91c7a8;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
}

body.hb-ui-v1 .upload-dropzone > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

body.hb-ui-v1 .upload-dropzone small {
  color: var(--hb-muted);
}

body.hb-ui-v1 .upload-dropzone-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  border-radius: 14px;
  background: var(--hb-green);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

body.hb-ui-v1 .upload-dropzone input[type=file] {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 10px;
  padding: 9px !important;
  border: 1px solid var(--hb-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body.hb-ui-v1 .protocol-upload-form .btn {
  min-height: 48px;
  justify-content: center;
}

body.hb-ui-v1 .protocol-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}

body.hb-ui-v1 .protocol-feature-grid > div {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--hb-border);
  border-radius: 14px;
  background: #f9fbfa;
}

body.hb-ui-v1 .protocol-feature-grid span {
  color: var(--hb-green);
  font-size: 11px;
  font-weight: 900;
}

body.hb-ui-v1 .protocol-feature-grid small {
  color: var(--hb-muted);
  line-height: 1.4;
}

body.hb-ui-v1 .data-workspace-card {
  padding: 14px !important;
}

body.hb-ui-v1 .data-workspace-card .filter-bar {
  margin-bottom: 12px;
}

body.hb-ui-v1 .sticky-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 250px);
  border: 1px solid var(--hb-border);
  border-radius: 13px;
  background: #fff;
}

body.hb-ui-v1 .sticky-table-wrap table {
  margin: 0;
}

body.hb-ui-v1 .sticky-table-wrap th,
body.hb-ui-v1 table th {
  background: #f4f8f6;
  color: #5d6d64;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: none;
}

body.hb-ui-v1 table td {
  border-color: #edf1ef;
}

body.hb-ui-v1 .admin-hub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.hb-ui-v1 .admin-hub-card {
  color: var(--hb-text);
  text-decoration: none;
}

body.hb-ui-v1 .admin-hub-card h3 {
  margin: 0;
  font-size: 18px;
}

body.hb-ui-v1 .admin-hub-card p {
  margin-bottom: 0;
}

body.hb-ui-v1 .admin-hub-card > b {
  color: var(--hb-green-dark);
  font-size: 13px;
}

body.hb-ui-v1 .production-plan-upload-hero {
  grid-template-columns: minmax(0, .8fr) minmax(560px, 1.2fr);
  align-items: stretch;
}

body.hb-ui-v1 .production-plan-upload-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

body.hb-ui-v1 .production-plan-exclusions-note {
  margin-top: 2px;
}

body.hb-ui-v1 .production-plan-exclusions-btn {
  margin-top: auto;
}

body.hb-ui-v1 .production-plan-upload-form {
  align-content: center;
}

body.hb-ui-v1 .production-plan-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

body.hb-ui-v1 .plan-upload-dropzone {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 138px;
  padding: 16px;
}

body.hb-ui-v1 .plan-upload-dropzone input[type=file] {
  grid-column: 1 / -1;
  min-width: 0;
}

body.hb-ui-v1 .production-plan-upload-form > .btn {
  min-height: 50px;
  justify-content: center;
}

body.hb-ui-v1 .production-plan-logic-card {
  width: auto;
}

body.hb-ui-v1 .formula-card {
  max-width: 920px;
  background: #122019 !important;
  color: #fff;
}

body.hb-ui-v1 .formula-card h2,
body.hb-ui-v1 .formula-card .workflow-kicker {
  color: #fff;
}

body.hb-ui-v1 .formula-card p {
  color: rgba(255,255,255,.72);
}

@media (max-width: 1100px) {
  body.hb-ui-v1 .workflow-layout,
  body.hb-ui-v1 .workflow-receipt-layout,
  body.hb-ui-v1 .inventory-workflow-layout {
    grid-template-columns: 1fr;
  }

  body.hb-ui-v1 .workflow-draft-card {
    position: static;
  }

  body.hb-ui-v1 .protocol-upload-hero {
    grid-template-columns: 1fr;
  }

  body.hb-ui-v1 .production-plan-file-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.hb-ui-v1 .admin-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body.hb-ui-v1 .workflow-hero,
  body.hb-ui-v1 .page-intro-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  body.hb-ui-v1 .workflow-hero {
    padding: 17px !important;
  }

  body.hb-ui-v1 .workflow-title-row {
    align-items: flex-start;
  }

  body.hb-ui-v1 .workflow-hero h2,
  body.hb-ui-v1 .page-intro-bar h2 {
    font-size: 22px !important;
  }

  body.hb-ui-v1 .workflow-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: stretch;
  }

  body.hb-ui-v1 .workflow-hero-actions > .btn:first-child {
    flex: 1 0 100%;
    min-height: 50px !important;
  }

  body.hb-ui-v1 .workflow-hero-actions .btn,
  body.hb-ui-v1 .workflow-hero-actions form,
  body.hb-ui-v1 .workflow-hero-actions form .btn {
    flex: 1 1 90px;
    width: auto !important;
    justify-content: center;
  }

  body.hb-ui-v1 .workflow-hero-actions form .btn {
    width: 100% !important;
  }

  body.hb-ui-v1 .workflow-layout {
    gap: 0;
  }

  body.hb-ui-v1 .workflow-receipt-layout .workflow-draft-card,
  body.hb-ui-v1 .inventory-workflow-layout .workflow-draft-card {
    order: 1;
  }

  body.hb-ui-v1 .workflow-receipt-layout .workflow-search-card,
  body.hb-ui-v1 .inventory-workflow-layout .workflow-search-card {
    order: 2;
  }

  body.hb-ui-v1 .filter-bar {
    padding: 7px !important;
    gap: 7px !important;
  }

  body.hb-ui-v1 .filter-bar input,
  body.hb-ui-v1 .filter-bar select,
  body.hb-ui-v1 .filter-bar .btn,
  body.hb-ui-v1 .admin-form input,
  body.hb-ui-v1 .receipt-add-form input,
  body.hb-ui-v1 .receipt-add-form select {
    min-height: 46px !important;
    font-size: 16px !important;
  }

  body.hb-ui-v1 .issue-line {
    padding: 13px !important;
    gap: 10px !important;
  }

  body.hb-ui-v1 .issue-line-edit-form,
  body.hb-ui-v1 .receipt-add-form {
    grid-template-columns: 1fr !important;
  }

  body.hb-ui-v1 .issue-line-edit-form .btn,
  body.hb-ui-v1 .issue-line-form .btn,
  body.hb-ui-v1 .receipt-add-form .btn {
    width: 100% !important;
    min-height: 44px;
  }

  body.hb-ui-v1 .inventory-choice-grid,
  body.hb-ui-v1 .admin-hub-grid,
  body.hb-ui-v1 .protocol-feature-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.hb-ui-v1 .inventory-choice-card,
  body.hb-ui-v1 .admin-hub-card {
    min-height: 160px;
  }

  body.hb-ui-v1 .protocol-upload-hero {
    padding: 18px !important;
    gap: 18px;
  }

  body.hb-ui-v1 .protocol-upload-copy h2 {
    font-size: 24px;
  }

  body.hb-ui-v1 .upload-dropzone {
    min-height: 132px;
    padding: 14px;
    flex-wrap: wrap;
  }

  body.hb-ui-v1 .protocol-feature-grid > div {
    min-height: auto;
  }

  body.hb-ui-v1 .page-intro-bar {
    padding: 3px 1px;
  }

  body.hb-ui-v1 .data-workspace-card {
    padding: 10px !important;
  }

  body.hb-ui-v1 .sticky-table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
  }

  body.hb-ui-v1 .production-plan-file-grid {
    grid-template-columns: 1fr;
  }

  body.hb-ui-v1 .plan-upload-dropzone {
    min-height: 126px;
  }

  body.hb-ui-v1 .scanner-card .scan-video {
    min-height: min(58vh, 420px);
  }
}
