:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --ink: #14201c;
  --muted: #68746f;
  --line: #dde4e1;
  --brand: #163f34;
  --brand-strong: #0f3028;
  --brand-soft: #e9f3ef;
  --accent: #e5f65c;
  --danger: #b84343;
  --warning: #a66a16;
  --success: #167a53;
  --shadow: 0 12px 30px rgba(24, 46, 38, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(22, 122, 83, 0.22);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 24px 18px;
  background: var(--brand-strong);
  color: #f8fbfa;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 28px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--brand-strong);
  font-size: 18px;
  font-weight: 800;
}

.brand strong,
.brand span,
.operator-card strong,
.operator-card span {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand span {
  margin-top: 3px;
  color: #9fb4ad;
  font-size: 11px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b6c5c0;
  text-align: left;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(229, 246, 92, 0.14);
  color: #ffffff;
}

.nav-item.active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  content: "";
}

.nav-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  font-size: 13px;
}

.sidebar-footer {
  margin-top: auto;
}

.simulation-badge {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px dashed rgba(229, 246, 92, 0.35);
  border-radius: 9px;
  color: #cfdfd9;
  font-size: 11px;
  text-align: center;
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #244f43;
  color: #e9f4ef;
  font-size: 11px;
  font-weight: 700;
}

.operator-card strong {
  font-size: 12px;
}

.operator-card span {
  margin-top: 3px;
  color: #8fa7a0;
  font-size: 10px;
}

.main-area {
  min-height: 100vh;
  margin-left: 252px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 34px;
  border-bottom: 1px solid rgba(221, 228, 225, 0.8);
  background: rgba(244, 246, 248, 0.93);
  backdrop-filter: blur(14px);
}

.topbar h1,
.hero-row h2,
.panel h3,
.task-card h3 {
  margin: 0;
}

.topbar h1 {
  margin-top: 2px;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warehouse-select,
.search-box {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.warehouse-select {
  gap: 7px;
  padding-left: 11px;
}

.warehouse-select span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.warehouse-select select,
.search-box input {
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
}

.warehouse-select select {
  padding: 10px 12px 10px 0;
  font-weight: 650;
}

.search-box input {
  width: 260px;
  padding: 11px 13px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.view {
  display: none;
  padding: 30px 34px 48px;
}

.view.active {
  display: block;
  animation: view-in 180ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-row h2 {
  font-size: 27px;
  letter-spacing: -0.035em;
}

.muted {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.text-button,
.chip {
  border-radius: 9px;
  font-weight: 750;
}

.primary-button {
  padding: 11px 16px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 48, 40, 0.13);
}

.primary-button:hover:not(:disabled) {
  background: #0e372b;
}

.primary-button:disabled {
  cursor: not-allowed;
  border-color: #bdc8c4;
  background: #cbd3d0;
  box-shadow: none;
}

.secondary-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.text-button {
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--success);
}

.full {
  width: 100%;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 128px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card span,
.metric-card small,
.metric-card strong {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric-card strong {
  margin-top: 12px;
  font-size: 31px;
  letter-spacing: -0.04em;
}

.metric-card small {
  margin-top: 10px;
  color: var(--muted);
}

.accent-card {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.accent-card span,
.accent-card small {
  color: #b8cdc6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel h3,
.task-card h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.success {
  background: #e8f5ef;
  color: var(--success);
}

.status-pill.warning {
  background: #fff4e2;
  color: var(--warning);
}

.status-pill.neutral {
  background: #eef2f0;
  color: #5a6863;
}

.status-pill.danger {
  background: #fdecec;
  color: var(--danger);
}

.flow-track {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.flow-track button {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.flow-track button:hover {
  border-color: #a7bdb5;
}

.flow-track span,
.flow-track strong,
.flow-track small {
  display: block;
}

.flow-track span {
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
}

.flow-track strong {
  margin-top: 7px;
  font-size: 12px;
}

.flow-track small {
  margin-top: 4px;
  color: var(--muted);
}

.flow-track i {
  color: #9eaaa6;
  font-style: normal;
}

.mini-chart {
  display: flex;
  height: 88px;
  align-items: flex-end;
  gap: 6px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.mini-chart span {
  flex: 1;
  min-width: 8px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, var(--brand) 0%, #7da699 100%);
}

.exception-list {
  display: grid;
  gap: 8px;
}

.exception-list > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--panel-soft);
}

.exception-list strong,
.exception-list small {
  display: block;
}

.exception-list strong {
  font-size: 11px;
}

.exception-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.exception-list b {
  color: var(--muted);
  font-size: 9px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.danger {
  background: var(--danger);
}

.dot.warning {
  background: #d49a3f;
}

.carrier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.carrier-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-soft);
}

.carrier-card strong,
.carrier-card span,
.carrier-card small {
  display: block;
}

.carrier-card strong {
  font-size: 12px;
}

.carrier-card span {
  margin-top: 8px;
  font-size: 21px;
  font-weight: 800;
}

.carrier-card small {
  margin-top: 5px;
  color: var(--muted);
}

.progress,
.cell-progress {
  overflow: hidden;
  border-radius: 999px;
  background: #e1e8e5;
}

.progress {
  height: 5px;
  margin-top: 12px;
}

.progress i,
.cell-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.65fr);
  gap: 16px;
}

.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

td strong {
  font-size: 11px;
}

td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.scanner-panel {
  min-height: 420px;
}

.scan-visual {
  margin: 20px 0;
  padding: 22px;
  border: 1px dashed #a6b6b0;
  border-radius: 12px;
  background: #f6faf8;
  text-align: center;
}

.scan-visual span,
.scan-visual strong {
  display: block;
}

.scan-visual span {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
}

.scan-visual strong {
  color: var(--brand);
  font-size: 24px;
  letter-spacing: 4px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

.field input:focus,
.field select:focus {
  border-color: #6d9587;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.span-2 {
  grid-column: span 2;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.task-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.task-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-code {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.task-card h3 {
  margin-top: 17px;
}

.task-card > p {
  margin: 5px 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.recommendation {
  margin-bottom: 13px;
  padding: 13px;
  border-radius: 10px;
  background: var(--brand-soft);
}

.recommendation small,
.recommendation strong,
.recommendation span {
  display: block;
}

.recommendation small {
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.recommendation strong {
  margin-top: 5px;
  font-size: 15px;
}

.recommendation span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.chip {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 10px;
}

.chip.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.cell-progress {
  display: inline-block;
  width: 86px;
  height: 5px;
  margin-right: 8px;
  vertical-align: middle;
}

.picking-layout {
  grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1fr);
}

.pick-task-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.pick-task {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.pick-task.active {
  border-color: #84a89a;
  background: var(--brand-soft);
}

.pick-task > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #edf1ef;
  font-size: 9px;
  font-weight: 800;
}

.pick-task strong,
.pick-task small {
  display: block;
}

.pick-task strong {
  font-size: 11px;
}

.pick-task small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.pick-task b {
  color: var(--success);
  font-size: 9px;
}

.pick-sequence {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.pick-sequence > div {
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--panel-soft);
}

.pick-sequence > div:last-child {
  border-right: 0;
}

.pick-sequence .done {
  background: #eef7f3;
}

.pick-sequence .current {
  background: #fff6df;
}

.pick-sequence span,
.pick-sequence strong,
.pick-sequence small {
  display: block;
}

.pick-sequence span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 50%;
  background: #dce4e1;
  font-size: 8px;
  font-weight: 800;
}

.pick-sequence .done span {
  background: var(--success);
  color: #ffffff;
}

.pick-sequence .current span {
  background: #c99130;
  color: #ffffff;
}

.pick-sequence strong {
  font-size: 10px;
}

.pick-sequence small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.scan-help {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 12px 0;
  padding: 13px;
  border-radius: 10px;
  background: var(--panel-soft);
}

.scan-help strong,
.scan-help span {
  display: block;
}

.scan-help strong {
  font-size: 12px;
}

.scan-help span {
  grid-column: 1;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.scan-help b {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--brand);
}

.packing-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.order-summary {
  position: sticky;
  top: 112px;
}

.order-summary > h3 {
  font-size: 16px;
}

.order-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.order-meta > div,
.handover-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.order-meta span,
.handover-card span {
  color: var(--muted);
  font-size: 9px;
}

.order-meta strong,
.handover-card strong {
  font-size: 10px;
}

.package-tabs {
  display: grid;
  gap: 7px;
  margin: 17px 0;
}

.package-tab {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
}

.package-tab.active {
  border-color: #79a091;
  background: var(--brand-soft);
}

.package-tab span {
  color: var(--success);
  font-size: 8px;
}

.package-tab.ghost {
  justify-content: center;
  border-style: dashed;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 0;
  padding-top: 4px;
}

.timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  min-height: 52px;
}

.timeline > div:not(:last-child)::before {
  position: absolute;
  top: 11px;
  bottom: -1px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline i {
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid #c7d0cc;
  border-radius: 50%;
  background: #ffffff;
}

.timeline .active i,
.timeline .done i {
  border-color: var(--success);
  background: var(--success);
}

.timeline strong,
.timeline small {
  display: block;
}

.timeline strong {
  font-size: 10px;
}

.timeline small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.packing-main {
  display: grid;
  gap: 14px;
}

.packing-scan-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: end;
}

.scan-field input {
  min-height: 48px;
  font-size: 15px;
  font-weight: 650;
}

.demo-barcodes {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.demo-barcodes button {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--brand);
  font-size: 9px;
}

.content-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.content-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.content-row strong,
.content-row small {
  display: block;
}

.content-row strong {
  font-size: 11px;
}

.content-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.qty-control {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 55px;
  justify-content: flex-end;
}

.qty-control strong {
  font-size: 23px;
}

.qty-control span {
  color: var(--muted);
  font-size: 11px;
}

.measurements {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.inline-note {
  margin-right: auto;
  color: var(--muted);
  font-size: 9px;
}

.step-panel {
  transition: opacity 160ms ease;
}

.disabled-step {
  opacity: 0.58;
}

.disabled-step input,
.disabled-step select {
  pointer-events: none;
}

.handover-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.handover-card > div {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
}

.handover-card span,
.handover-card strong {
  display: block;
}

.handover-card strong {
  margin-top: 5px;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 100;
  max-width: 360px;
  padding: 12px 15px;
  border-radius: 10px;
  background: #102f27;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(11, 34, 28, 0.23);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #853c3c;
}

@media (max-width: 1280px) {
  .sidebar {
    width: 222px;
  }

  .main-area {
    margin-left: 222px;
  }

  .view,
  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .search-box input {
    width: 210px;
  }
}
