:root {
  --bg: #eef1f3;
  --surface: #ffffff;
  --surface-soft: #f6f7f8;
  --sidebar: #171b1d;
  --sidebar-soft: #22282b;
  --line: #dfe4e7;
  --line-strong: #c9d0d5;
  --text: #202528;
  --muted: #66727a;
  --muted-strong: #4f5b62;
  --accent: #966136;
  --accent-dark: #74451f;
  --accent-soft: #f3e6d5;
  --green: #137c61;
  --green-soft: #e3f4ed;
  --blue: #386b9a;
  --blue-soft: #e7f0f8;
  --danger: #a54835;
  --danger-soft: #f8e7e2;
  --shadow: 0 18px 40px rgba(27, 36, 42, 0.08);
  color-scheme: light;
  font-family: "IBM Plex Sans", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100vh;
}

.app-view[hidden] {
  display: none !important;
}

.system-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  padding: 14px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--sidebar);
  color: #f7f8f8;
}

.brand-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 0 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.brand-block > div:not(.brand-mark) {
  display: none;
}

.module-nav {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.module-nav a {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 7px 3px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.module-nav a[aria-current="page"] {
  background: linear-gradient(180deg, #a66b3c, #875526);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.module-nav a[aria-disabled="true"] {
  color: rgba(255, 255, 255, 0.5);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
}

.nav-text {
  display: block;
  line-height: 1.1;
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 0 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  text-align: center;
}

.sidebar-footer strong {
  display: none;
}

.sidebar-footer span {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.workspace {
  min-width: 0;
  padding: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.16;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.workflow-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 6px;
  min-width: 470px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workflow-step {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.workflow-step.done {
  color: var(--green);
}

.workflow-step.active {
  background: var(--accent);
  color: #fff;
}

.warehouse-dashboard {
  margin: 0 -20px 18px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
}

.dashboard-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.dashboard-heading h2 {
  margin: 0;
  font-size: 21px;
}

.dashboard-updated-at {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-texture-section {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.dashboard-texture-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-texture-heading h3 {
  margin: 0;
  font-size: 18px;
}

.dashboard-texture-heading > strong {
  color: var(--green);
  font-size: 14px;
}

.dashboard-texture-search {
  display: block;
  margin-bottom: 8px;
}

.dashboard-texture-search > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dashboard-texture-search input {
  width: 100%;
  height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.dashboard-texture-search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(19, 124, 97, 0.11);
}

.dashboard-texture-search input::placeholder {
  color: var(--muted);
}

.dashboard-texture-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.dashboard-texture-filters button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-texture-filters button.active {
  background: var(--green-soft);
  color: var(--green);
}

.dashboard-texture-filters em {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 10px;
  background: #edf1f2;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.dashboard-texture-filters button.active em {
  background: #fff;
  color: var(--green);
}

.dashboard-texture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.dashboard-texture-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 0 10px;
  min-width: 0;
  min-height: 72px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.dashboard-texture-card.catalog-only {
  cursor: default;
}

.dashboard-texture-card.has-inventory {
  border-left: 3px solid var(--green);
}

.dashboard-texture-card.selected-texture {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(19, 124, 97, 0.14);
}

.dashboard-texture-photo {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 5px;
  background: #e7ecef;
}

.dashboard-texture-photo-button {
  position: relative;
  padding: 0;
  border: 0;
  cursor: zoom-in;
}

.dashboard-texture-photo-button::after {
  content: "+";
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(23, 27, 29, 0.82);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-texture-photo-button:hover::after,
.dashboard-texture-photo-button:focus-visible::after {
  background: var(--green);
}

.dashboard-texture-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-texture-photo i {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-texture-info,
.dashboard-texture-stock {
  min-width: 0;
}

.dashboard-texture-record {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

button.dashboard-texture-record:hover .dashboard-texture-info strong,
button.dashboard-texture-record:focus-visible .dashboard-texture-info strong {
  color: var(--green);
}

.dashboard-texture-info strong,
.dashboard-texture-info small,
.dashboard-texture-stock strong,
.dashboard-texture-stock small {
  display: block;
}

.dashboard-texture-info strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-texture-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.dashboard-texture-title > strong {
  flex: 0 1 auto;
}

.dashboard-texture-tags {
  display: flex;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.dashboard-texture-tag {
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 4px;
  background: #edf1f2;
  color: #657078;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.dashboard-texture-tag.new {
  background: #e3f3ec;
  color: #087455;
}

.dashboard-texture-tag.recommended {
  background: #f5e7d7;
  color: #94531f;
}

.dashboard-texture-tag.processing {
  background: #e6eef7;
  color: #2d6296;
}

.dashboard-texture-tag.sample {
  background: #f7e5ea;
  color: #9f3f58;
}

.dashboard-texture-info small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-texture-stock {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.dashboard-texture-stock strong {
  color: var(--green);
  font-size: 12px;
}

.texture-admin-view {
  min-width: 0;
  padding-bottom: 24px;
}

.texture-admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 15px 0 13px;
  border-bottom: 1px solid var(--line);
}

.texture-admin-toolbar h2 {
  margin: 0;
  font-size: 21px;
}

.texture-admin-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 130px 108px 72px;
  gap: 8px;
  width: min(700px, 70%);
}

.texture-admin-toolbar-actions select {
  min-height: 40px;
  padding: 8px 30px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.texture-admin-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--green);
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.texture-admin-notice.error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.texture-admin-lock-button {
  min-height: 40px;
  padding-inline: 10px;
}

.texture-admin-auth-dialog {
  width: min(420px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.texture-admin-auth-dialog::backdrop {
  background: rgba(18, 23, 26, 0.66);
}

.texture-admin-auth-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.texture-admin-auth-form header h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.texture-admin-auth-form header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.texture-admin-auth-form input {
  min-height: 46px;
}

.texture-admin-auth-error {
  margin: -6px 0 0;
  padding: 9px 10px;
  border-left: 3px solid var(--danger);
  border-radius: 4px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.texture-admin-auth-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.texture-admin-auth-form footer button {
  min-height: 40px;
}

.supplier-directory-view {
  min-width: 0;
  padding-bottom: 24px;
}

.supplier-directory-toolbar,
.supplier-style-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.supplier-directory-toolbar {
  padding: 15px 0 13px;
  border-bottom: 1px solid var(--line);
}

.supplier-directory-toolbar h2,
.supplier-style-heading h2 {
  margin: 0;
  font-size: 21px;
}

.supplier-directory-toolbar .compact-search {
  width: min(340px, 100%);
}

.supplier-directory-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  width: min(500px, 54%);
}

.supplier-export-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  color: var(--accent);
  white-space: nowrap;
}

.supplier-export-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.supplier-export-notice {
  margin: 10px 0 0;
  padding: 9px 12px;
  border: 1px solid #b9ddd4;
  border-radius: 6px;
  background: #eef8f5;
  color: #08765f;
  font-size: 13px;
  font-weight: 700;
}

.supplier-export-notice.error {
  border-color: #e5c8b4;
  background: #fbf3ed;
  color: #9a5527;
}

.supplier-directory-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
  padding-top: 14px;
}

.supplier-directory-panel {
  min-width: 0;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.supplier-directory-list-heading,
.supplier-style-heading {
  min-height: 42px;
}

.supplier-directory-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 8px;
}

.supplier-directory-list-heading span,
.supplier-style-heading > strong {
  color: var(--muted);
  font-size: 12px;
}

.supplier-directory-list {
  display: grid;
  gap: 5px;
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.supplier-directory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.supplier-directory-row:hover {
  background: var(--surface);
}

.supplier-directory-row.active {
  border-color: rgba(150, 97, 54, 0.3);
  background: var(--accent-soft);
}

.supplier-directory-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.supplier-directory-row strong,
.supplier-directory-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-directory-row small {
  color: var(--muted);
  font-size: 11px;
}

.supplier-directory-row .supplier-directory-stock {
  color: var(--green);
  font-weight: 800;
}

.supplier-directory-row em {
  min-width: 26px;
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.supplier-style-panel {
  min-width: 0;
}

.supplier-style-search {
  width: min(520px, 100%);
  margin: 12px 0;
}

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

.supplier-style-row {
  display: grid;
  grid-template-columns: 66px minmax(180px, 0.8fr) minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.supplier-style-photo {
  display: grid;
  width: 66px;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #e8edef;
  color: var(--muted);
}

.supplier-style-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supplier-style-photo i {
  font-style: normal;
  font-weight: 800;
}

.supplier-style-primary {
  min-width: 0;
}

.supplier-style-primary > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.supplier-style-primary strong {
  font-size: 16px;
}

.supplier-style-primary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.supplier-style-primary h3 {
  margin: 3px 0 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.supplier-style-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  margin: 0;
}

.supplier-style-details > div {
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

.supplier-style-details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.supplier-style-details dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
}

.supplier-style-stock dd strong,
.supplier-style-stock dd small {
  display: block;
}

.supplier-style-stock dd strong {
  color: var(--green);
  font-size: 12px;
}

.supplier-style-stock dd small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.supplier-directory-empty {
  padding: 28px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

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

.transaction-log-view {
  min-width: 0;
  padding-bottom: 24px;
}

.transaction-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0 13px;
  border-bottom: 1px solid var(--line);
}

.transaction-toolbar h2 {
  margin: 0;
  font-size: 21px;
}

.transaction-toolbar > strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.transaction-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) auto minmax(150px, 0.8fr) 142px 142px auto;
  gap: 10px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.transaction-filters .field {
  gap: 5px;
}

.transaction-filters .field > span {
  font-size: 11px;
}

.transaction-filters input,
.transaction-filters select,
.transaction-reset-button {
  min-height: 38px;
}

.transaction-type-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(48px, 1fr));
  gap: 3px;
  min-width: 170px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.transaction-type-filter button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.transaction-type-filter button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(27, 36, 42, 0.12);
}

.transaction-reset-button {
  padding-inline: 12px;
  white-space: nowrap;
}

.transaction-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line-strong);
}

.transaction-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.transaction-summary > div:first-child {
  padding-left: 0;
}

.transaction-summary > div:last-child {
  border-right: 0;
}

.transaction-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.transaction-summary strong {
  font-size: 21px;
}

.transaction-table-wrap {
  min-width: 0;
  overflow-x: auto;
  padding-top: 8px;
}

.transaction-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--surface);
}

.transaction-table th {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.transaction-table th:nth-child(1) { width: 126px; }
.transaction-table th:nth-child(2) { width: 78px; }
.transaction-table th:nth-child(3) { width: 116px; }
.transaction-table th:nth-child(4) { width: 230px; }
.transaction-table th:nth-child(5) { width: 92px; }
.transaction-table th:nth-child(6) { width: 142px; }
.transaction-table th:nth-child(8) { width: 78px; }

.transaction-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
  vertical-align: middle;
}

.transaction-table tbody tr:hover {
  background: #fafbfb;
}

.transaction-table time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.transaction-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}

.transaction-type.inbound {
  background: var(--green-soft);
  color: var(--green);
}

.transaction-type.outbound {
  background: var(--danger-soft);
  color: var(--danger);
}

.transaction-pending {
  display: block;
  margin-top: 3px;
  color: var(--danger);
  font-size: 9px;
  font-weight: 700;
}

.transaction-material,
.transaction-detail {
  overflow-wrap: anywhere;
}

.transaction-material strong,
.transaction-material span,
.transaction-material small,
.transaction-detail span,
.transaction-detail small {
  display: block;
}

.transaction-material strong {
  color: var(--text);
  font-size: 14px;
}

.transaction-material span,
.transaction-detail span {
  margin-top: 2px;
  color: var(--muted-strong);
}

.transaction-material small,
.transaction-detail small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.transaction-quantity {
  font-size: 13px;
  white-space: nowrap;
}

.transaction-quantity.inbound {
  color: var(--green);
}

.transaction-quantity.outbound {
  color: var(--danger);
}

.transaction-view-button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.transaction-view-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.transaction-empty-state {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  text-align: center;
}

.transaction-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.transaction-empty-state span {
  font-size: 12px;
}

.texture-admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.texture-admin-list-panel {
  min-width: 0;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.texture-admin-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.texture-admin-list-heading strong {
  font-size: 14px;
}

.texture-admin-list-heading span {
  color: var(--muted);
  font-size: 12px;
}

.texture-admin-list {
  display: grid;
  gap: 5px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding-right: 4px;
}

.texture-admin-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.texture-admin-row:hover {
  background: var(--surface-soft);
}

.texture-admin-row.active {
  border-color: rgba(150, 97, 54, 0.34);
  background: var(--accent-soft);
}

.texture-admin-thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 5px;
  background: #e7ecef;
}

.texture-admin-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.texture-admin-thumb i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.texture-admin-row-copy,
.texture-admin-row-copy small {
  min-width: 0;
}

.texture-admin-row-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.texture-admin-row-title strong {
  flex: 0 0 auto;
  font-size: 14px;
}

.texture-admin-row-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texture-admin-empty {
  padding: 30px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.texture-admin-editor {
  position: sticky;
  top: 14px;
  min-width: 0;
}

.texture-admin-form {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.texture-admin-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.texture-admin-editor-heading h2 {
  margin: 0;
  font-size: 22px;
}

.texture-admin-save-state {
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.texture-admin-image-block {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.texture-admin-image-preview {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #edf1f3;
  color: var(--muted);
}

button.texture-admin-image-preview {
  cursor: zoom-in;
}

.texture-admin-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.texture-admin-image-preview.empty strong,
.texture-admin-image-preview.empty span {
  display: block;
}

.texture-admin-image-preview.empty strong {
  color: var(--muted-strong);
  font-size: 22px;
}

.texture-admin-image-preview.empty span {
  margin-top: 5px;
  font-size: 11px;
}

.texture-admin-image-preview.pending::after {
  content: "待保存";
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(23, 27, 29, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.texture-admin-image-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.texture-admin-image-actions small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
}

.texture-admin-image-actions .ghost-button {
  min-height: 34px;
  padding: 6px 10px;
}

.texture-admin-file-button {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.texture-admin-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.texture-admin-new-code {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.texture-admin-new-code .field {
  max-width: 220px;
}

.texture-supplier-section {
  min-width: 0;
}

.texture-supplier-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px 9px;
}

.texture-supplier-heading h3 {
  margin: 1px 0 0;
  font-size: 16px;
}

.texture-supplier-heading .ghost-button {
  min-width: 108px;
}

.texture-supplier-variants {
  border-top: 1px solid var(--line);
}

.texture-supplier-empty {
  padding: 24px 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.texture-supplier-variant {
  padding: 10px 14px 12px;
  background: #fbfcfc;
}

.texture-supplier-variant + .texture-supplier-variant {
  border-top: 1px solid var(--line);
}

.texture-supplier-variant > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.texture-supplier-variant-title {
  font-size: 13px;
}

.texture-supplier-remove {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.texture-supplier-remove:hover,
.texture-supplier-remove:focus-visible {
  border-color: rgba(181, 63, 63, 0.42);
  color: var(--danger);
}

.texture-supplier-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
}

.texture-supplier-specification,
.texture-supplier-products-field {
  grid-column: span 2;
}

.texture-supplier-display-tags {
  grid-column: 1 / -1;
}

.texture-supplier-inspection {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.texture-supplier-inspection > header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 7px;
}

.texture-supplier-inspection > header strong {
  color: var(--ink);
  font-size: 12px;
}

.texture-supplier-inspection > header span {
  color: var(--muted);
  font-size: 11px;
}

.texture-supplier-inspection > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.texture-supplier-specification textarea,
.texture-supplier-products-field textarea {
  resize: vertical;
}

.texture-supplier-display-tags {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.texture-supplier-display-tags legend {
  margin-bottom: 5px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.texture-supplier-display-tags > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.texture-supplier-variant .field {
  gap: 4px;
}

.texture-supplier-variant .field span {
  font-size: 11px;
}

.texture-supplier-variant .field input,
.texture-supplier-variant .field textarea {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12px;
}

.texture-supplier-variant .field textarea {
  min-height: 58px;
  line-height: 1.4;
}

.texture-supplier-variant .texture-tag-option {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 11px;
}

.texture-supplier-variant .texture-tag-option input {
  width: 14px;
  height: 14px;
}

.texture-admin-tags legend {
  margin-bottom: 7px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.texture-admin-tags > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.texture-tag-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.texture-tag-option:has(input:checked) {
  border-color: rgba(19, 124, 97, 0.34);
  background: var(--green-soft);
  color: var(--green);
}

.texture-tag-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.texture-admin-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.texture-admin-form-footer > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.texture-admin-form-footer .primary-button {
  min-width: 138px;
}

.dashboard-texture-stock small {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-texture-selection {
  scroll-margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid #8cb3a6;
  border-radius: 6px;
  background: var(--green-soft);
}

.dashboard-texture-selection div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.dashboard-texture-selection span,
.dashboard-texture-selection small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-texture-selection strong {
  color: var(--green);
  font-size: 18px;
}

.dashboard-texture-selection button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #8cb3a6;
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-texture-shelf-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dashboard-texture-shelf-list > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid #8cb3a6;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.dashboard-texture-shelf-list > button:hover,
.dashboard-texture-shelf-list > button:focus-visible {
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(19, 124, 97, 0.1);
}

.dashboard-texture-shelf-list > button span:last-child {
  text-align: right;
}

.dashboard-texture-shelf-list strong,
.dashboard-texture-shelf-list small {
  display: block;
}

.dashboard-texture-shelf-list strong {
  font-size: 13px;
}

.dashboard-texture-shelf-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dashboard-metrics > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
}

.dashboard-metrics > div:last-child {
  border-right: 0;
}

.dashboard-metrics span,
.dashboard-metrics strong {
  display: block;
}

.dashboard-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-metrics strong {
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.2;
}

.dashboard-metrics > div:nth-child(3) strong,
.dashboard-metrics > div:nth-child(4) strong {
  color: var(--danger);
}

.dashboard-metrics > div:nth-child(5) strong {
  color: var(--green);
}

.dashboard-metrics > div:nth-child(6) strong {
  color: var(--blue);
}

.dashboard-body {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 340px;
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}

.dashboard-map-panel {
  min-width: 0;
}

.dashboard-location-map {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.dashboard-map-legend {
  justify-content: flex-start;
}

.map-legend .dashboard-empty-key {
  border: 1px solid var(--line-strong);
  background: #eef2f4;
}

.map-legend .dashboard-occupied-key {
  background: #16805d;
}

.map-legend .dashboard-attention-key {
  background: #b6405a;
}

.dashboard-location-map .map-shelf.status-empty {
  background: #eef2f4;
  color: #738089;
}

.dashboard-location-map .map-shelf.status-occupied {
  border: 1px solid #0f694b;
  background: #16805d;
  color: #fff;
}

.dashboard-location-map .map-shelf.status-occupied small {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.dashboard-location-map .map-shelf.status-attention {
  border: 1px solid #943047;
  background: #b6405a;
  color: #fff;
}

.dashboard-location-map .map-shelf.status-attention small {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.dashboard-location-map .map-shelf.selected {
  background: var(--sidebar);
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--sidebar);
}

.dashboard-location-map .map-shelf.selected small {
  color: rgba(255, 255, 255, 0.76);
}

.dashboard-location-map .map-shelf.texture-dimmed {
  border: 1px solid #d8dde0;
  background: #f2f4f5;
  color: #a5adb2;
  opacity: 0.34;
  cursor: default;
  box-shadow: none;
}

.dashboard-location-map .map-shelf.texture-match {
  z-index: 2;
  border: 1px solid #075e43;
  background: #0f805a;
  color: #fff;
  opacity: 1;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0f805a;
}

.dashboard-location-map .map-shelf.texture-match small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-status-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.dashboard-status-panel section + section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dashboard-list-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dashboard-list-title h3 {
  margin: 0;
  font-size: 15px;
}

.dashboard-list-title span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-task-list,
.dashboard-activity-list {
  display: grid;
  gap: 5px;
}

.dashboard-task-list button,
.dashboard-activity-list button {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.dashboard-task-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-left: 3px solid #d98745;
  background: #fff8f1;
}

.dashboard-task-list strong,
.dashboard-task-list small,
.dashboard-activity-list strong,
.dashboard-activity-list small {
  display: block;
}

.dashboard-task-list strong,
.dashboard-activity-list strong {
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-task-list small,
.dashboard-activity-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.dashboard-task-list em {
  color: var(--danger);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-activity-list button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
}

.activity-type {
  display: grid;
  place-items: center;
  min-height: 26px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
}

.activity-type.inbound {
  background: var(--green-soft);
  color: var(--green);
}

.activity-type.outbound {
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-activity-list time {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.dashboard-empty-text {
  margin: 0;
  padding: 14px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.board-layout {
  display: grid;
  grid-template-columns: 220px minmax(410px, 1fr) minmax(320px, 22vw);
  gap: 14px;
  align-items: start;
}

.supplier-panel,
.catalog-panel,
.detail-panel {
  min-height: calc(100vh - 112px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.supplier-panel,
.detail-panel {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.supplier-panel {
  padding: 14px 10px;
}

.catalog-panel {
  min-width: 0;
  padding: 18px;
}

.detail-panel {
  padding: 0;
}

.mobile-sheet-grip,
.mobile-close-detail,
.mobile-detail-backdrop {
  display: none;
}

.panel-heading,
.catalog-toolbar,
.section-row-title,
.detail-title,
.dialog-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading {
  margin-bottom: 12px;
  padding: 0 4px;
}

.panel-heading h2,
.catalog-toolbar h2,
.detail-title h2,
.section-row-title h3 {
  margin: 0;
}

.panel-heading h2,
.catalog-toolbar h2 {
  font-size: 18px;
}

.panel-heading > strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 13px;
}

.section-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.catalog-toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.field input,
.field textarea {
  padding: 9px 11px;
}

.field select,
.catalog-toolbar select {
  padding: 8px 32px 8px 10px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.catalog-toolbar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(150, 97, 54, 0.12);
}

.search-field {
  margin: 0 4px 12px;
}

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

.supplier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.supplier-row:hover {
  background: var(--surface-soft);
}

.supplier-row.active {
  border-color: rgba(150, 97, 54, 0.26);
  background: var(--accent-soft);
}

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

.supplier-row strong {
  font-size: 14px;
}

.supplier-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.supplier-row em {
  min-width: 30px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.catalog-toolbar {
  align-items: flex-start;
  margin-bottom: 14px;
}

.toolbar-actions {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 150px;
  gap: 10px;
  width: min(560px, 58%);
}

.compact-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.summary-strip div {
  padding: 9px 10px;
  border-radius: 6px;
  background: #fff;
}

.summary-strip span,
.detail-kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-strip strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.material-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.material-card:hover {
  border-color: rgba(150, 97, 54, 0.35);
  transform: translateY(-1px);
}

.material-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(150, 97, 54, 0.12);
}

.material-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.card-image {
  position: relative;
  aspect-ratio: 1.18 / 1;
  background:
    linear-gradient(135deg, rgba(40, 48, 53, 0.06), rgba(150, 97, 54, 0.08)),
    #edf0f1;
}

.card-image img,
.detail-image img,
.photo-thumb img,
.image-dialog img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image span,
.detail-image span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
}

.image-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.image-placeholder strong {
  color: var(--muted-strong);
  font-size: 24px;
}

.image-placeholder small {
  padding: 4px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
}

.material-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.material-title {
  display: grid;
  gap: 7px;
}

.material-title strong {
  min-height: 39px;
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.material-title span {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.material-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.material-meta div {
  min-width: 0;
  padding: 6px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.material-meta dt,
.archive-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.material-meta dd,
.archive-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.material-body p {
  display: grid;
  gap: 3px;
  min-height: 38px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.material-body b {
  color: var(--muted);
  font-size: 11px;
}

.detail-content {
  display: grid;
  gap: 0;
}

.detail-header {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.75 / 1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(40, 48, 53, 0.08), rgba(56, 107, 154, 0.08)),
    #edf0f1;
}

.detail-title {
  align-items: flex-start;
  margin-top: 12px;
}

.detail-title h2 {
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.32;
  word-break: break-word;
}

.texture-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.detail-title button,
.primary-button,
.ghost-button,
.text-button,
.close-dialog {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.detail-title button {
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted-strong);
}

.detail-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-button {
  border-color: #e0b8ae !important;
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.detail-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.detail-kpis div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-kpis strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.detail-section {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.section-row-title {
  align-items: flex-start;
  margin-bottom: 10px;
}

.section-row-title h3 {
  font-size: 16px;
}

.section-row-title span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

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

.archive-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.binding-note {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #315d83;
  font-size: 12px;
  line-height: 1.55;
}

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

.material-master-summary {
  min-width: 0;
  border: 1px solid #a9c9bd;
  border-radius: 8px;
  background: var(--green-soft);
}

.material-master-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.material-master-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.material-master-grid > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid rgba(19, 124, 97, 0.16);
  border-bottom: 1px solid rgba(19, 124, 97, 0.16);
}

.material-master-grid > div:nth-child(2n) {
  border-right: 0;
}

.material-master-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.material-master-grid dt {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.material-master-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.form-wide {
  grid-column: 1 / -1;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
}

.unit-input input {
  border-radius: 8px 0 0 8px;
}

.unit-input em {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #fff;
}

.ghost-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted-strong);
}

.text-button {
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.photo-thumb,
.upload-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.photo-thumb {
  padding: 0;
}

.photo-thumb img {
  object-fit: cover;
}

.text-thumb {
  padding: 8px;
  overflow-wrap: anywhere;
}

.upload-tile {
  border-style: dashed;
  cursor: pointer;
}

.upload-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

.record-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.record-item > span {
  display: grid;
  place-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.record-item.inbound > span {
  background: var(--green-soft);
  color: var(--green);
}

.record-item.outbound > span {
  background: var(--danger-soft);
  color: var(--danger);
}

.record-item.check > span {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.record-item strong {
  display: block;
  font-size: 13px;
}

.record-item p {
  margin: 4px 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.record-item small {
  color: var(--muted);
  font-size: 11px;
}

.record-item em {
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.detail-empty,
.empty-state {
  padding: 28px;
  text-align: center;
}

.detail-empty h2,
.empty-state h3 {
  margin: 0 0 8px;
}

.detail-empty p,
.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.inline-notice {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 10px 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.mobile-flow-entry {
  display: none;
}

.mobile-flow {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow: auto;
  background: var(--bg);
  color: var(--text);
}

.mobile-flow[hidden] {
  display: none;
}

.mobile-flow-shell {
  min-height: 100dvh;
  padding: 12px;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.outbound-flow-shell {
  width: min(760px, 100%);
  margin: 0 auto;
}

.inbound-flow-shell {
  width: min(760px, 100%);
  margin: 0 auto;
}

.mobile-flow-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: center;
  margin: -12px -12px 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 241, 243, 0.96);
  backdrop-filter: blur(12px);
}

.mobile-flow-header div {
  min-width: 0;
  text-align: center;
}

.mobile-flow-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mobile-flow-header h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.25;
}

.mobile-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.mobile-flow-steps span {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.mobile-flow-steps b,
.step-badge,
.complete-mark {
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.mobile-flow-steps b {
  width: 22px;
  height: 22px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
}

.mobile-flow-steps span.ready {
  border-color: rgba(19, 124, 97, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.mobile-flow-steps span.ready b {
  background: var(--green);
  color: #fff;
}

.mobile-flow-steps span.active {
  border-color: rgba(150, 97, 54, 0.42);
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mobile-flow-steps span.active b {
  background: var(--accent);
  color: #fff;
}

.inbound-step-page,
.outbound-step-page {
  min-height: 320px;
}

.inbound-step-page > .mobile-flow-card,
.outbound-step-page > .mobile-flow-card {
  margin-bottom: 0;
}

.inbound-step-page .mobile-choice-list,
.outbound-step-page .mobile-choice-list,
.outbound-step-page .texture-choice-grid {
  max-height: min(54dvh, 520px);
  overflow: auto;
}

.mobile-flow-card,
.mobile-complete-card {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mobile-flow-card.muted-card {
  opacity: 0.72;
}

.mobile-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mobile-card-title h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.mobile-card-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.step-badge {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
}

.mobile-choice-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  margin-top: 10px;
  overflow: auto;
}

.mobile-choice-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.mobile-choice-list button.active {
  border-color: rgba(150, 97, 54, 0.38);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(150, 97, 54, 0.1);
}

.outbound-material-list button.out-of-stock {
  border-style: dashed;
  background: var(--surface-soft);
  opacity: 1;
}

.outbound-material-list button.out-of-stock small {
  color: var(--muted);
}

.outbound-material-list button.out-of-stock:hover {
  border-color: rgba(150, 97, 54, 0.45);
  background: var(--accent-soft);
}

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

.mobile-choice-list strong {
  font-size: 14px;
  line-height: 1.35;
}

.mobile-choice-list small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mobile-choice-list em {
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.mobile-empty-hint {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.inbound-material-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}

.inbound-material-summary img,
.inbound-material-summary i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  object-fit: cover;
}

.inbound-material-summary strong,
.inbound-material-summary span {
  display: block;
}

.inbound-material-summary strong {
  font-size: 15px;
}

.inbound-material-summary span {
  margin-top: 4px;
  color: var(--muted-strong);
  font-size: 12px;
}

.outbound-entry-button,
.outbound-confirm-button {
  background: var(--blue);
}

.outbound-entry-button:hover,
.outbound-confirm-button:hover {
  background: #28577f;
}

.outbound-path-control button {
  font-size: 13px;
}

.texture-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.texture-choice-grid button {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.texture-choice-grid button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(56, 107, 154, 0.12);
}

.texture-choice-grid strong,
.texture-choice-grid span,
.texture-choice-grid em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.texture-choice-grid strong {
  font-size: 14px;
}

.texture-choice-grid span,
.texture-choice-grid em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.texture-choice-grid em {
  color: var(--blue);
  font-weight: 800;
}

.outbound-texture-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding: 9px 10px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

.outbound-texture-summary span {
  color: var(--muted);
  font-size: 11px;
}

.outbound-texture-summary strong {
  color: var(--blue);
  font-size: 14px;
}

.outbound-supplier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.outbound-supplier-grid button {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.outbound-supplier-grid button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.outbound-supplier-grid strong,
.outbound-supplier-grid small {
  overflow-wrap: anywhere;
}

.outbound-supplier-grid small {
  color: var(--muted);
  font-size: 10px;
}

.outbound-material-summary em {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.outbound-allocation-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 7px;
  background: var(--blue-soft);
}

.outbound-allocation-summary span,
.outbound-allocation-summary em {
  color: var(--muted-strong);
  font-size: 11px;
  font-style: normal;
}

.outbound-allocation-summary strong {
  color: var(--blue);
  font-size: 16px;
}

.outbound-allocation-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.outbound-allocation-list > div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.outbound-allocation-list b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
}

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

.outbound-allocation-list strong {
  font-size: 13px;
}

.outbound-allocation-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.outbound-allocation-list em {
  color: var(--danger);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.outbound-shortage {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid rgba(165, 72, 53, 0.28);
  border-radius: 8px;
  background: var(--danger-soft);
}

.outbound-shortage strong {
  color: var(--danger);
}

.outbound-shortage span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.outbound-shortage.allowed {
  margin-top: 8px;
  border-color: rgba(150, 97, 54, 0.3);
  background: var(--accent-soft);
}

.outbound-shortage.allowed strong {
  color: var(--accent-dark);
}

.location-recommendation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(19, 124, 97, 0.3);
  border-radius: 8px;
  background: var(--green-soft);
}

.location-recommendation span {
  align-self: center;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.location-recommendation strong {
  align-self: center;
  color: var(--green);
  font-size: 15px;
}

.location-recommendation p {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.location-select-field {
  margin-bottom: 12px;
}

.warehouse-reference-map {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.warehouse-reference-map.disabled {
  opacity: 0.56;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend i {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: #d9e6f5;
}

.map-legend .selected-key {
  background: var(--green);
}

.map-legend .recommended-key {
  border: 2px solid var(--green);
  background: #fff;
}

.map-legend .landmark-key {
  background: #f2dac5;
}

.warehouse-map-canvas {
  display: grid;
  grid-template-columns: 598fr 868fr;
  width: 100%;
  aspect-ratio: 1466 / 766;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fbfcfc;
}

.warehouse-zone {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.zone-b {
  border-right: 1px dashed #6b91b9;
}

.zone-guide {
  position: absolute;
  top: 1.5%;
  right: 2%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.zone-name {
  position: absolute;
  left: 15%;
  right: 5%;
  bottom: 2.5%;
  font-size: 15px;
  text-align: center;
}

.physical-rack,
.factory-landmark {
  position: absolute;
  min-width: 0;
  min-height: 0;
  border-radius: 3px;
}

.physical-rack {
  border: 1px solid #8fadd0;
  background: #d9e6f5;
}

.rack-levels {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  height: 100%;
}

.single-rack .rack-levels {
  grid-template-rows: 1fr;
}

.physical-rack-label {
  position: absolute;
  top: 50%;
  right: calc(100% + 4px);
  z-index: 2;
  width: 54px;
  transform: translateY(-50%);
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.factory-landmark {
  display: grid;
  place-items: center;
  border: 1px solid #d6a87e;
  background: #f8e3d2;
  color: #5b3a25;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.rack-d7-temp { left: 24.1%; top: 3.6%; width: 9.8%; height: 8.1%; }
.rack-d7-1 { left: 24.1%; top: 12%; width: 9.8%; height: 20.9%; }
.rack-d7-2 { left: 24.1%; top: 33.3%; width: 9.8%; height: 20.8%; }
.multi-cutter { left: 41.3%; top: 3.6%; width: 15.7%; height: 84.4%; }
.rack-db-1 { left: 59.4%; top: 3.6%; width: 9.8%; height: 8%; }
.rack-db-2 { left: 59.4%; top: 12.1%; width: 9.8%; height: 8%; }
.rack-db-3 { left: 59.4%; top: 20.8%; width: 9.8%; height: 8%; }
.rack-db-4 { left: 59.4%; top: 29.5%; width: 9.8%; height: 8%; }
.rack-db-5 { left: 59.4%; top: 38.2%; width: 9.8%; height: 8%; }
.rack-db-6 { left: 59.4%; top: 46.9%; width: 9.8%; height: 8%; }
.single-cutter { left: 59.4%; top: 55.4%; width: 9.8%; height: 32.6%; }

.single-cutter {
  padding: 4px 2px;
  writing-mode: vertical-rl;
}

.rack-d5-4 { left: 16.3%; top: 24.8%; width: 18.5%; height: 7.6%; }
.rack-d5-3 { left: 36.4%; top: 24.8%; width: 18.2%; height: 7.6%; }
.rack-d5-2 { left: 56.2%; top: 24.8%; width: 18.3%; height: 7.6%; }
.rack-d5-1 { left: 76.4%; top: 24.8%; width: 18.5%; height: 7.6%; }
.rack-d6-1 { left: 16.1%; top: 34.7%; width: 6.7%; height: 20.8%; }
.rack-d6-2 { left: 16.1%; top: 57.2%; width: 6.7%; height: 20.8%; }
.semi-finished { left: 24.2%; top: 34.7%; width: 71.1%; height: 43.5%; font-size: 17px; }

.rack-d5-4 .physical-rack-label,
.rack-d5-3 .physical-rack-label,
.rack-d5-2 .physical-rack-label,
.rack-d5-1 .physical-rack-label {
  top: auto;
  right: 0;
  bottom: calc(100% + 3px);
  width: 100%;
  transform: none;
  text-align: center;
}

.map-shelf {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 1px;
  border: 0;
  border-radius: 2px;
  background: #d9e6f5;
  color: #234a70;
  text-align: center;
}

.map-shelf strong {
  font-size: 9px;
  line-height: 1;
}

.map-shelf small {
  color: #55718c;
  font-size: 7px;
  line-height: 1;
}

.map-shelf.recommended {
  box-shadow: inset 0 0 0 2px var(--green);
  background: #fff;
  color: var(--green);
}

.map-shelf.selected {
  background: var(--green);
  color: #fff;
}

.map-shelf.selected small {
  color: rgba(255, 255, 255, 0.78);
}

.map-shelf.selected.recommended::after {
  content: "荐";
  position: absolute;
  top: 1px;
  right: 1px;
  padding: 1px 2px;
  border-radius: 2px;
  background: #fff;
  color: var(--green);
  font-size: 6px;
  font-weight: 800;
}

.material-choice-list button {
  grid-template-columns: 54px minmax(0, 1fr);
}

.material-choice-list img,
.material-choice-list i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  object-fit: cover;
  overflow-wrap: anywhere;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 800;
}

.segmented-control button.active {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 6px 18px rgba(27, 36, 42, 0.08);
}

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

.mobile-photo-block {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.mobile-upload-tile {
  min-height: 92px;
}

.mobile-photo-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-photo-thumb::after {
  content: "删除";
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(18, 23, 26, 0.62);
  color: #fff;
  font-size: 10px;
}

.shelf-chip-list {
  display: flex;
  gap: 7px;
  margin: 10px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.shelf-chip-list button {
  flex: 0 0 auto;
  max-width: 180px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-chip-list button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.shelf-source {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shelf-occupants {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.shelf-occupants strong,
.shelf-occupants span {
  display: block;
}

.shelf-occupants strong {
  font-size: 14px;
}

.shelf-occupants span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.shelf-occupants ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shelf-occupants li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.shelf-occupants small {
  flex: 0 0 auto;
  color: var(--muted);
}

.shelf-occupants p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.qr-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.qr-panel p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #315d83;
  font-size: 12px;
  line-height: 1.5;
}

.qr-panel .qr-secure-note + .qr-file-button {
  grid-column: 1 / -1;
  min-height: 44px;
}

.qr-file-button {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.qr-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.scanner-box {
  grid-column: 1 / -1;
  overflow: hidden;
  aspect-ratio: 1.55 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.scanner-box video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-flow-notice {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.inbound-inspection-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(18, 23, 26, 0.66);
}

.inbound-inspection-dialog {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(520px, 100%);
  max-height: min(760px, calc(100dvh - 28px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.inbound-inspection-dialog > header {
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--line);
}

.inbound-inspection-dialog > header span {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.inbound-inspection-dialog > header h2 {
  margin: 4px 0 0;
  font-size: 21px;
  line-height: 1.3;
}

.inbound-inspection-dialog > header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.inspection-profile-type {
  padding: 9px 16px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.inspection-profile-type.custom {
  background: var(--blue-soft);
  color: var(--blue);
}

.inspection-notice {
  margin: 12px 16px 0;
  padding: 11px 12px;
  border-left: 4px solid var(--danger);
  background: var(--danger-soft);
}

.inspection-notice strong {
  color: var(--danger);
  font-size: 12px;
}

.inspection-notice p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

.inspection-check-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  padding: 12px 16px;
  overflow: auto;
}

.inspection-check-list label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.inspection-check-list label.checked {
  border-color: rgba(19, 124, 97, 0.32);
  background: var(--green-soft);
}

.inspection-check-list input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
}

.inspection-check-list span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  font-size: 13px;
  line-height: 1.45;
}

.inspection-check-list b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 11px;
}

.inspection-check-list label.checked b {
  background: var(--green);
  color: #fff;
}

.inbound-inspection-dialog > footer {
  padding: 11px 16px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.inspection-progress {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.inbound-inspection-dialog > footer > div {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 8px;
}

.inbound-inspection-dialog > footer button {
  min-height: 42px;
}

.mobile-flow-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.mobile-flow-footer .primary-button {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
}

.mobile-flow-footer.inbound-step-footer {
  left: 50%;
  right: auto;
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 8px;
  width: min(760px, 100%);
  transform: translateX(-50%);
}

.mobile-flow-footer.inbound-step-footer.single-action {
  grid-template-columns: 1fr;
}

.inbound-step-footer .ghost-button,
.inbound-step-footer .primary-button {
  min-height: 46px;
}

.mobile-flow-shell.completed {
  display: grid;
  place-items: center;
  padding-bottom: 12px;
}

.mobile-complete-card {
  width: min(360px, 100%);
  text-align: center;
}

.complete-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  background: var(--green);
  color: #fff;
  font-size: 30px;
}

.mobile-complete-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.mobile-complete-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.mobile-complete-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.mobile-complete-actions .danger-button {
  grid-column: 1 / -1;
}

body.mobile-flow-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .warehouse-map-canvas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    aspect-ratio: auto;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .warehouse-zone {
    flex: 0 0 auto;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
  }

  .zone-b {
    aspect-ratio: 598 / 766;
  }

  .zone-a {
    aspect-ratio: 868 / 766;
  }
}

.image-dialog,
.texture-inventory-dialog {
  width: min(860px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}

.image-dialog::backdrop,
.texture-inventory-dialog::backdrop {
  background: rgba(18, 23, 26, 0.66);
}

.texture-inventory-dialog {
  width: min(680px, calc(100% - 28px));
}

.texture-inventory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.texture-inventory-header h2 {
  margin: 0;
  font-size: 24px;
}

.texture-inventory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.texture-inventory-summary > div {
  padding: 11px 12px;
  border-right: 1px solid var(--line);
}

.texture-inventory-summary > div:last-child {
  border-right: 0;
}

.texture-inventory-summary span,
.texture-inventory-summary strong {
  display: block;
}

.texture-inventory-summary span {
  color: var(--muted);
  font-size: 11px;
}

.texture-inventory-summary strong {
  margin-top: 3px;
  font-size: 17px;
}

.texture-inventory-content {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: min(52vh, 480px);
  overflow: auto;
}

.texture-inventory-content > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.texture-inventory-content > button:hover,
.texture-inventory-content > button:focus-visible {
  border-color: #8cb3a6;
  background: var(--green-soft);
}

.texture-inventory-content > button span:last-child {
  text-align: right;
}

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

.texture-inventory-content strong {
  font-size: 14px;
}

.texture-inventory-content small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 560px) {
  .dashboard-texture-selection {
    align-items: flex-start;
  }

  .dashboard-texture-selection div {
    display: grid;
  }

  .dashboard-texture-shelf-list {
    grid-template-columns: 1fr;
  }

  .texture-inventory-summary {
    grid-template-columns: 1fr;
  }

  .texture-inventory-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .texture-inventory-summary > div:last-child {
    border-bottom: 0;
  }

  .texture-inventory-content > button {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .texture-inventory-content > button span:last-child {
    text-align: left;
  }
}

.close-dialog {
  display: block;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted-strong);
}

.image-dialog-stage {
  position: relative;
}

.image-dialog img {
  height: min(68vh, 680px);
  margin-top: 12px;
  border-radius: 8px;
  background: #edf0f1;
  object-fit: contain;
}

.image-dialog-nav {
  position: absolute;
  z-index: 1;
  top: calc(50% + 6px);
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(23, 27, 29, 0.82);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.image-dialog-nav:hover,
.image-dialog-nav:focus-visible {
  background: #171b1d;
}

.image-dialog-nav.previous {
  left: 14px;
}

.image-dialog-nav.next {
  right: 14px;
}

.image-dialog-nav[hidden] {
  display: none;
}

.dialog-caption {
  padding-top: 12px;
}

.dialog-caption span {
  color: var(--muted);
}

@media (max-width: 640px) {
  .texture-supplier-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .texture-supplier-specification,
  .texture-supplier-products-field,
  .texture-supplier-display-tags {
    grid-column: 1 / -1;
  }

  .image-dialog-nav {
    width: 40px;
    height: 40px;
    font-size: 32px;
  }

  .image-dialog-nav.previous {
    left: 8px;
  }

  .image-dialog-nav.next {
    right: 8px;
  }
}

@media (max-width: 1240px) {
  .dashboard-body {
    grid-template-columns: minmax(560px, 1fr) 300px;
  }

  .board-layout {
    grid-template-columns: 210px minmax(390px, 1fr) 320px;
  }

  .workflow-tabs {
    min-width: 410px;
  }
}

@media (max-width: 1060px) {
  .topbar {
    display: grid;
  }

  .workflow-tabs {
    width: 100%;
    min-width: 0;
  }

  .dashboard-body {
    grid-template-columns: 1fr;
  }

  .texture-admin-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .supplier-directory-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .supplier-style-row {
    grid-template-columns: 60px minmax(150px, 0.7fr) minmax(0, 1.6fr);
  }

  .supplier-style-photo {
    width: 60px;
  }

  .supplier-style-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 10px;
  }

  .texture-admin-toolbar-actions {
    grid-template-columns: minmax(190px, 1fr) 122px 104px 68px;
    width: min(640px, 72%);
  }

  .texture-admin-image-block {
    grid-template-columns: 140px minmax(150px, 1fr);
  }

  .dashboard-status-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }

  .dashboard-status-panel section + section {
    padding-top: 0;
    padding-left: 16px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .board-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
    grid-column: 1 / -1;
    min-height: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .system-sidebar {
    position: static;
    height: auto;
    padding: 10px;
    align-items: stretch;
  }

  .brand-block {
    justify-content: flex-start;
    gap: 10px;
    padding: 0 0 10px;
  }

  .brand-block > div:not(.brand-mark) {
    display: block;
  }

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

  .brand-block strong {
    color: #fff;
    font-size: 15px;
  }

  .brand-block span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .module-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 8px;
  }

  .module-nav a {
    min-height: 46px;
    padding: 6px 4px;
    font-size: 11px;
    text-align: center;
  }

  .module-nav a[aria-disabled="true"]::after,
  .sidebar-footer {
    display: none;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .workspace {
    padding: 14px;
  }

  .texture-admin-toolbar {
    display: grid;
    align-items: start;
  }

  .texture-admin-toolbar-actions {
    grid-template-columns: minmax(0, 1fr) 120px 104px 68px;
    width: 100%;
  }

  .texture-admin-layout {
    grid-template-columns: 1fr;
  }

  .supplier-directory-toolbar {
    display: grid;
    align-items: start;
  }

  .supplier-directory-toolbar .compact-search {
    width: 100%;
  }

  .supplier-directory-actions {
    width: 100%;
  }

  .supplier-directory-layout {
    grid-template-columns: 1fr;
  }

  .supplier-directory-panel {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .supplier-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 230px;
  }

  .supplier-style-row {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }

  .supplier-style-photo {
    width: 58px;
  }

  .supplier-style-details {
    grid-column: 1 / -1;
  }

  .texture-admin-list-panel {
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .texture-admin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 330px;
  }

  .texture-admin-editor {
    position: static;
  }

  .texture-admin-image-block {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .texture-supplier-fields,
  .texture-supplier-inspection > div {
    grid-template-columns: 1fr;
  }

  .texture-supplier-specification,
  .texture-supplier-products-field {
    grid-column: auto;
  }

  .warehouse-dashboard {
    margin: 0 -14px 14px;
    padding: 14px;
  }

  .dashboard-heading {
    align-items: flex-start;
  }

  .dashboard-heading h2 {
    font-size: 19px;
  }

  .dashboard-texture-section {
    padding: 10px;
  }

  .dashboard-texture-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
  }

  .dashboard-texture-filters button {
    gap: 3px;
    min-width: 0;
    padding: 4px 2px;
    font-size: 11px;
  }

  .dashboard-texture-filters em {
    min-width: 17px;
    padding: 1px 3px;
    font-size: 9px;
  }

  .dashboard-texture-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-metrics > div {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .dashboard-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .dashboard-status-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-status-panel section + section {
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mobile-flow-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .mobile-flow-entry h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
  }

  .mobile-flow-entry .primary-button {
    flex: 0 0 auto;
    min-width: 108px;
    min-height: 42px;
    font-size: 14px;
  }

  .mobile-entry-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    flex: 0 0 auto;
  }

  .mobile-entry-actions .ghost-button,
  .mobile-entry-actions .primary-button {
    min-width: 112px;
    min-height: 38px;
  }

  .outbound-supplier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-reference-map {
    margin-left: -2px;
    margin-right: -2px;
  }

  .layered-rack .map-shelf small {
    display: none;
  }

  .zone-name {
    font-size: 14px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .workflow-tabs,
  .summary-strip,
  .toolbar-actions,
  .board-layout {
    grid-template-columns: 1fr;
  }

  .supplier-panel {
    position: static;
    min-height: auto;
    max-height: none;
  }

  .detail-panel {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    min-height: 0;
    max-height: min(86vh, 760px);
    overflow: auto;
    border-radius: 16px 16px 0 0;
    transform: translateY(105%);
    transition: transform 180ms ease;
    box-shadow: 0 -20px 52px rgba(18, 23, 26, 0.24);
  }

  body.mobile-detail-open {
    overflow: hidden;
  }

  body.mobile-detail-open .detail-panel {
    transform: translateY(0);
  }

  .mobile-detail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    background: rgba(18, 23, 26, 0.46);
  }

  body.mobile-detail-open .mobile-detail-backdrop {
    display: block;
  }

  .mobile-sheet-grip {
    position: sticky;
    top: 0;
    z-index: 3;
    display: block;
    height: 18px;
    background: #fff;
  }

  .mobile-sheet-grip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    transform: translateX(-50%);
  }

  .catalog-panel {
    min-width: 0;
  }

  .catalog-toolbar {
    display: grid;
  }

  .toolbar-actions {
    width: 100%;
  }

  .inventory-form,
  .archive-grid,
  .material-master-grid {
    grid-template-columns: 1fr;
  }

  .material-master-grid > div,
  .material-master-grid > div:nth-child(2n),
  .material-master-grid > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(19, 124, 97, 0.16);
  }

  .material-master-grid > div:last-child {
    border-bottom: 0;
  }

  .mobile-close-detail {
    display: block;
    width: 100%;
    min-height: 40px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-weight: 700;
  }

  .detail-image {
    aspect-ratio: 2.25 / 1;
  }

  .inventory-section {
    order: 1;
  }

  .photo-section {
    order: 2;
  }

  .archive-section {
    order: 3;
  }

  .records-section {
    order: 4;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .mobile-form-grid {
    grid-template-columns: 1fr;
  }

  .mobile-photo-block {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .mobile-upload-tile {
    min-height: 82px;
  }

  .mobile-photo-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .texture-admin-toolbar-actions,
  .texture-admin-list,
  .texture-admin-fields {
    grid-template-columns: 1fr;
  }

  .texture-admin-image-block {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
  }

  .texture-admin-image-preview {
    max-width: 112px;
  }

  .supplier-directory-list,
  .supplier-style-details {
    grid-template-columns: 1fr;
  }

  .supplier-directory-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .supplier-export-button {
    width: 100%;
  }

  .supplier-style-details > div {
    padding: 8px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 1180px) {
  .transaction-filters {
    grid-template-columns: minmax(240px, 1fr) auto minmax(180px, 0.7fr);
  }
}

@media (max-width: 760px) {
  .module-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .transaction-toolbar {
    align-items: flex-start;
  }

  .transaction-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transaction-search,
  .transaction-type-filter,
  .transaction-reset-button {
    grid-column: 1 / -1;
  }

  .transaction-type-filter {
    width: 100%;
  }

  .transaction-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transaction-summary > div,
  .transaction-summary > div:first-child {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
  }

  .transaction-summary > div:nth-child(2n) {
    border-right: 0;
  }

  .transaction-table-wrap {
    overflow: visible;
  }

  .transaction-table,
  .transaction-table tbody,
  .transaction-table tr,
  .transaction-table td {
    display: block;
    width: 100%;
  }

  .transaction-table {
    min-width: 0;
    background: transparent;
  }

  .transaction-table thead {
    display: none;
  }

  .transaction-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }

  .transaction-table td {
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .transaction-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
  }

  .transaction-table .transaction-material,
  .transaction-table .transaction-detail {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .transaction-view-button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .transaction-toolbar {
    display: grid;
  }

  .transaction-filters,
  .transaction-summary {
    grid-template-columns: 1fr;
  }

  .transaction-summary > div,
  .transaction-summary > div:first-child {
    border-right: 0;
  }
}

/* Account access and audit */
.auth-pending {
  overflow: hidden;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, #171b1d 0 30%, #eef1f3 30% 100%);
}

.auth-panel {
  width: min(100%, 410px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(22, 29, 33, 0.18);
}

.auth-logo {
  display: block;
  width: 150px;
  height: 76px;
  margin-bottom: 20px;
  object-fit: contain;
  object-position: left center;
}

.auth-heading span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.auth-heading h1 {
  margin: 6px 0 0;
  font-size: 27px;
  line-height: 1.25;
}

.auth-checking {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.auth-login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.auth-login-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.auth-login-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.auth-submit {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.auth-login-error {
  margin: -4px 0 0;
  padding: 9px 11px;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.session-user {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.session-user span,
.session-user strong,
.session-user small {
  display: block;
}

.session-user strong {
  font-size: 13px;
}

.session-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.session-user button,
.table-action-button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.account-admin-view {
  display: grid;
  gap: 18px;
}

.account-admin-heading,
.account-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-admin-heading h2,
.account-section-title h3 {
  margin: 3px 0 0;
}

.account-create-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(130px, 0.8fr) minmax(140px, 0.9fr) 120px minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.account-create-form input,
.account-create-form select,
.account-table input,
.account-table select {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.account-admin-notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.account-admin-notice.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.account-admin-section {
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.account-section-title {
  margin-bottom: 10px;
}

.account-section-title h3 {
  font-size: 17px;
}

.account-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.account-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  font-size: 12px;
}

.account-table th,
.account-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.account-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

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

.account-table td > strong,
.account-table td > small {
  display: block;
}

.account-table td > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.account-disabled {
  color: var(--muted);
  background: #f7f8f8;
}

.account-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.account-active-toggle input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.audit-table {
  min-width: 860px;
}

.audit-result {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.audit-result.success {
  background: var(--green-soft);
  color: var(--green);
}

.audit-result.failure {
  background: var(--danger-soft);
  color: var(--danger);
}

.audit-result.logout {
  background: var(--blue-soft);
  color: var(--blue);
}

.account-empty {
  padding: 30px !important;
  color: var(--muted);
  text-align: center !important;
}

@media (max-width: 1060px) {
  .topbar-actions {
    justify-content: space-between;
  }

  .account-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .auth-gate {
    place-items: start center;
    padding: 54px 16px 24px;
    background: #eef1f3;
  }

  .auth-panel {
    padding: 26px 22px;
  }

  .module-nav {
    overflow-x: auto;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(52px, 1fr);
  }

  .topbar-actions {
    display: grid;
  }

  .session-user {
    justify-content: space-between;
    padding: 8px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .account-create-form {
    grid-template-columns: 1fr;
  }
}
