:root {
  --ink: #102033;
  --muted: #5f7189;
  --subtle: #7d91aa;
  --line: #cddaea;
  --panel: #ffffff;
  --page: #eaf1fb;
  --soft: #f5f9ff;
  --accent: #1d66e5;
  --accent-strong: #0e4fb9;
  --accent-soft: #e7f0ff;
  --gold: #d5a244;
  --blue: #1d66e5;
  --cyan: #35c7f4;
  --danger: #b42318;
  --shadow: 0 20px 52px rgba(16, 43, 84, 0.16);
  --small-shadow: 0 12px 28px rgba(16, 43, 84, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.82), rgba(224, 234, 248, 0.94)),
    linear-gradient(90deg, rgba(29, 102, 229, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 102, 229, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(53, 199, 244, 0.16), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(29, 102, 229, 0.16), transparent 32%),
    var(--page);
  background-size: auto, 32px 32px, 32px 32px, auto, auto, auto;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

body.mobile-preview {
  --mobile-dashboard-height: 154px;
  background: #dcebf5;
  overflow-x: hidden;
}

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

button {
  border: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

.mobile-preview .app-shell {
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  display: block;
  overflow-x: hidden;
  background: #f6fbff;
  box-shadow: 0 0 0 1px #cbd8ea, 0 24px 80px rgba(15, 23, 42, 0.22);
}

.mobile-preview .sidebar {
  display: none;
}

.mobile-preview .content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 0 10px 14px;
  display: grid;
  gap: 10px;
}

.mobile-preview.mobile-logged-in .content {
  padding-top: var(--mobile-dashboard-height);
}

.mobile-preview:not(.mobile-logged-in) .content {
  min-height: 100vh;
  padding: 0;
}

.mobile-preview:not(.mobile-logged-in) .mobile-dashboard,
.mobile-preview:not(.mobile-logged-in) .panel,
.mobile-preview:not(.mobile-logged-in) .mobile-mini-section {
  display: none;
}

.mobile-preview.mobile-logged-in .login-band {
  display: none;
}

.mobile-preview.mobile-home .panel {
  display: none;
}

.mobile-preview.mobile-panel-open .mobile-dashboard {
  display: grid;
}

.mobile-preview.mobile-panel-open .mobile-mini-section {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #f8fbff;
  background:
    linear-gradient(180deg, #071a34 0%, #082447 52%, #061326 100%);
  border-right: 1px solid rgba(93, 166, 255, 0.18);
  box-shadow: inset -1px 0 0 rgba(53, 199, 244, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand h1 {
  font-size: 19px;
  line-height: 1.25;
}

.brand p {
  margin-top: 5px;
  color: #9db9d8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.company-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid rgba(99, 178, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 102, 229, 0.24), rgba(53, 199, 244, 0.1)),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 34px rgba(0, 0, 0, 0.14);
}

.company-card strong {
  display: block;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.28;
  text-align: justify;
  text-align-last: justify;
}

.company-card span {
  display: block;
  color: #b4d7f3;
  font-size: 11.5px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: justify;
  text-align-last: justify;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost,
.secondary,
.primary,
.prompt-chips button {
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nav-item {
  position: relative;
  min-height: 44px;
  padding: 12px 14px;
  text-align: left;
  color: #d9eaff;
  background: transparent;
}

.nav-item:hover {
  background: rgba(86, 154, 255, 0.12);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(29, 102, 229, 0.32), rgba(53, 199, 244, 0.12));
  box-shadow: inset 3px 0 0 var(--cyan);
}

.nav-group-label {
  margin: 10px 14px 2px;
  color: #9fb7d8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nav-placeholder {
  opacity: 0.54;
  cursor: not-allowed;
}

.nav-placeholder:hover {
  background: transparent;
}

.session-card {
  margin-top: auto;
  padding: 16px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(99, 178, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.label {
  color: #94a8b8;
  font-size: 12px;
  font-weight: 700;
}

.session-card strong {
  font-size: 16px;
}

.session-card span:not(.label) {
  color: #bfd0de;
  line-height: 1.45;
}

.question-help {
  margin-top: 4px;
  border: 1px solid rgba(126, 189, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 26, 52, 0.36);
  overflow: hidden;
}

.question-help summary {
  min-height: 38px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #eaf6ff;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.question-help summary::-webkit-details-marker {
  display: none;
}

.question-help summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #071a34;
  background: linear-gradient(135deg, #d8f5ff, #68c8ff);
  font-size: 16px;
  line-height: 1;
}

.question-help[open] summary::after {
  content: "-";
}

.question-help-body {
  max-height: 310px;
  overflow-y: auto;
  padding: 0 12px 12px;
  color: #c5dbef;
  font-size: 12px;
  line-height: 1.55;
}

.question-help-body p {
  color: #c5dbef;
}

.question-help-body ul {
  margin: 8px 0;
  padding-left: 17px;
}

.question-help-body li {
  margin: 5px 0;
}

.ghost {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  color: #ecf5fb;
  background: rgba(255, 255, 255, 0.1);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.content {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.login-band,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(196, 214, 239, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-band {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 560px);
  gap: 20px;
  padding: 18px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-copy h2,
.panel-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.login-copy p,
.panel-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

body:not(.mobile-preview) .login-band {
  position: sticky;
  top: 12px;
  z-index: 20;
  grid-template-columns: minmax(220px, 0.82fr) minmax(520px, 1.35fr);
  gap: 14px;
  padding: 10px 14px;
  align-items: center;
}

body:not(.mobile-preview) .login-band .eyebrow {
  margin-bottom: 3px;
  font-size: 10px;
}

body:not(.mobile-preview) .login-copy h2 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.08;
}

body:not(.mobile-preview) .login-copy p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
}

body:not(.mobile-preview) .login-form {
  gap: 9px;
  align-items: end;
}

body:not(.mobile-preview) .login-form label {
  gap: 4px;
  font-size: 13px;
}

body:not(.mobile-preview) .login-form input,
body:not(.mobile-preview) .login-form select {
  height: 34px;
  padding: 0 10px;
  font-size: 14px;
}

body:not(.mobile-preview) .login-form .primary {
  min-height: 34px;
  padding: 0 18px;
  font-size: 15px;
}

body:not(.mobile-preview) .password-toggle {
  width: 30px;
  height: 26px;
}

.password-field {
  position: relative;
  min-width: 0;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  color: #47627f;
  background: #eef5ff;
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: #fff;
  background: linear-gradient(135deg, #1d66e5, #35c7f4);
}

.password-toggle::before {
  content: "";
  width: 18px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50% / 58%;
}

.password-toggle::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.remember-login {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: 44px;
  white-space: nowrap;
  color: #475569;
}

.remember-login input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: #2563eb;
  box-shadow: none;
}

.login-error {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  white-space: pre-wrap;
}

.login-error[hidden] {
  display: none;
}

.permission-panel {
  background: #f8fafc;
  padding-top: 12px;
}

.permission-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 2px 6px;
}

.panel-head.permission-hero {
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.permission-hero > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.permission-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.permission-hero h2 {
  margin: 2px 0 2px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.permission-hero p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-hero .eyebrow {
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.permission-hero .secondary {
  min-height: 38px;
  padding: 0 18px;
}

.permission-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.permission-hero .practice-database-button {
  min-width: 112px;
  border-color: #cddbf4;
  background: #ffffff;
  color: #294fae;
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.07);
}

.permission-hero .practice-database-button.is-enabled {
  border-color: #b9e3cc;
  background: #effaf3;
  color: #237344;
}

.permission-hero .practice-database-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.permission-form {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #d7e1f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.permission-toolbar-main {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(170px, 0.82fr) minmax(300px, 1.28fr) minmax(128px, 0.58fr) minmax(118px, 0.52fr) 106px 150px;
  gap: 8px;
  align-items: center;
}

.permission-form label,
.permission-form .permission-field,
.permission-form .permission-inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #d7e1f0;
  border-radius: 8px;
  background: #fbfdff;
  color: #7a8aa0;
  font-size: 12px;
  font-weight: 800;
}

.permission-form .permission-inline-field > span,
.permission-form .permission-field > span {
  flex: 0 0 auto;
  color: #7a8aa0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.permission-form input,
.permission-form select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
  color: #0f172a;
  font-weight: 800;
  outline: none;
  box-shadow: none;
  transition: color 0.18s ease;
}

.permission-form .permission-inline-field:focus-within,
.permission-form .permission-field:focus-within {
  border-color: #4f7ee8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 126, 232, 0.14);
}

.permission-database-field,
.permission-scope-field {
  padding-right: 8px;
}

.permission-database-field span,
.permission-scope-field span {
  font-size: 13px;
}

.permission-database-field select,
.permission-scope-field select {
  font-size: 14px;
}

.permission-account-field,
.permission-name-field {
  position: relative;
  padding: 0 9px;
}

.permission-account-field {
  cursor: pointer;
}

.permission-account-field input {
  padding-right: 18px;
  cursor: pointer;
}

.permission-name-field input {
  padding: 0;
}

.permission-key-field {
  min-width: 0;
  position: relative;
  overflow: visible;
}

.permission-checkbox-group {
  position: relative;
  min-width: 0;
  min-height: 32px;
  flex: 1 1 auto;
  display: block;
  overflow: visible;
}

.permission-dropdown {
  position: relative;
  width: 100%;
}

.permission-dropdown-summary {
  height: 32px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #fbfdff;
  color: #244aa5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
  white-space: nowrap;
}

.permission-dropdown-summary::-webkit-details-marker {
  display: none;
}

.permission-dropdown-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}

.permission-dropdown[open] .permission-dropdown-summary {
  border-color: #4f7ee8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 126, 232, 0.14);
}

.permission-dropdown[open] .permission-dropdown-summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.permission-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(340px, calc(100vw - 48px));
  max-height: 240px;
  padding: 8px;
  display: grid;
  gap: 6px;
  overflow-y: auto;
  border: 1px solid #c8d7ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.permission-form .permission-choice {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid #d9e3f2;
  border-radius: 7px;
  color: #334155;
  background: #fbfdff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.permission-form .permission-choice input {
  width: 14px !important;
  min-width: 14px;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0;
  padding: 0 !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #4f7ee8;
}

.permission-form .permission-choice:has(input:checked) {
  border-color: #4f7ee8;
  background: linear-gradient(180deg, #f4f7ff 0%, #edf3ff 100%);
  color: #244aa5;
  box-shadow: inset 0 0 0 1px rgba(79, 126, 232, 0.16);
}

.permission-choice-empty {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px dashed #d9e3f2;
  border-radius: 999px;
  color: #94a3b8;
  background: #fbfdff;
  font-weight: 800;
  white-space: nowrap;
}

.permission-switch {
  min-height: 40px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px !important;
}

.permission-switch strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.permission-switch small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.permission-switch input {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #cbd5e1;
  cursor: pointer;
  box-shadow: none;
}

.permission-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease;
}

.permission-switch input:checked {
  background: #4f7ee8;
}

.permission-switch input:checked::after {
  transform: translateX(16px);
}

.permission-form .primary {
  width: 100%;
  min-height: 40px;
  border-radius: 7px;
  font-size: 13px;
  padding: 0 12px;
  white-space: nowrap;
}

.permission-more-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
}

.permission-more-fields[hidden] {
  display: none;
}

@media (max-width: 1440px) {
  .permission-toolbar-main {
    grid-template-columns: 136px 152px minmax(220px, 1fr) minmax(136px, 0.56fr) minmax(116px, 0.5fr) 92px 128px;
  }
}

.permission-candidate-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.practice-database-control {
  min-height: 42px;
  margin: 0 0 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  background: #fbfdff;
  color: #64748b;
}

.practice-database-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
}

.practice-database-copy strong {
  color: #0f172a;
  font-size: 13px;
  white-space: nowrap;
}

.practice-database-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-database-switch {
  flex: 0 0 auto;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #d9e3f2;
  border-radius: 999px;
  background: #ffffff;
  color: #294fae;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.practice-database-switch input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #4f7ee8;
}

.permission-hero .practice-database-switch-title {
  height: 30px;
  padding: 0 10px;
  border-color: #d9e3f2;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.permission-record-card.table-card {
  overflow: hidden;
  border-color: #d9e3f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.permission-record-card .table-title {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid #edf2f7;
  background: #fbfdff;
}

.permission-record-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

.permission-record-table th {
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.permission-record-table td {
  height: 48px;
  padding: 8px 14px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  vertical-align: middle;
}

.permission-record-table tbody tr:hover td {
  background: #f8fbff;
}

.permission-user-main {
  display: grid;
  gap: 3px;
}

.permission-user-main strong {
  color: #0f172a;
  font-size: 14px;
}

.permission-user-main span {
  color: #64748b;
  font-size: 12px;
}

.permission-permission-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.permission-permission-group > strong {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.permission-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.permission-pill,
.permission-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.permission-pill {
  color: #3157b7;
  background: #eef4ff;
}

.permission-status.enabled {
  color: #047857;
  background: #ecfdf5;
}

.permission-status.disabled {
  color: #9a3412;
  background: #fff7ed;
}

.permission-delete-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
}

.production-panel .branch-placeholder-card {
  display: none;
}

.production-panel .panel-head {
  align-items: center;
}

.production-refresh-btn {
  min-width: 88px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.production-form {
  display: grid;
  grid-template-columns: auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.production-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.production-form input,
.production-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.production-order-field {
  width: fit-content;
  max-width: 100%;
}

.production-input-row {
  display: grid;
  grid-template-columns: minmax(260px, 70ch) 156px 220px 96px;
  gap: 10px;
  align-items: center;
}

.production-input-row .primary {
  width: 156px;
  white-space: nowrap;
}

body:not(.mobile-preview) #productionOrderListBtn {
  width: 220px;
  white-space: nowrap;
}

.production-form .primary,
.production-form .secondary {
  min-height: 40px;
}

.production-workshop-picker {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.production-workshop-picker[hidden] {
  display: none !important;
}

.production-workshop-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.production-workshop-head strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.production-workshop-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-workshop-picker select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.production-workshop-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.production-workshop-choice {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #cddbf0;
  border-radius: 8px;
  background: #fff;
  color: #1f2f46;
  text-align: left;
  cursor: pointer;
}

.production-workshop-choice strong,
.production-workshop-choice span,
.production-workshop-choice em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-workshop-choice strong {
  font-size: 15px;
  font-weight: 900;
}

.production-workshop-choice span {
  margin-top: 3px;
  color: #51647f;
  font-size: 12px;
  font-weight: 800;
}

.production-workshop-choice em {
  margin-top: 2px;
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.production-workshop-choice:hover,
.production-workshop-choice.active {
  border-color: #4778f5;
  background: #eef5ff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.production-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.production-results {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.production-table-shell {
  margin-top: 12px;
}

.production-ui-shell {
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.production-ui-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 3px solid #8d9297;
  color: #172033;
  background: #f3f6fb;
}

.production-ui-title strong {
  font-size: 18px;
  font-weight: 950;
}

.production-ui-title span {
  color: #617086;
  font-size: 14px;
  font-weight: 900;
}

.production-ui-table-wrap {
  overflow-x: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.production-grid {
  border-collapse: collapse;
  border-spacing: 0;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
}

.production-grid th,
.production-grid td {
  border: 1px solid #a6a6a6;
}

.production-grid th {
  background: #f3f0e9;
  color: #111;
  font-weight: 500;
  text-align: center;
}

.production-grid tbody tr:first-child td {
  background: #d8edc0;
}

.production-grid tbody tr:nth-child(even) td {
  background: #eef0f0;
}

.production-grid tbody tr:hover td {
  background: #dcecff;
}

body:not(.mobile-preview) .production-grid.production-table {
  width: 100% !important;
  min-width: 1180px !important;
  table-layout: fixed;
}

body:not(.mobile-preview) .production-table th,
body:not(.mobile-preview) .production-table td {
  height: 38px;
  padding: 5px 7px;
  font-size: 13px;
  line-height: 1.18;
  white-space: nowrap;
  vertical-align: middle;
}

body:not(.mobile-preview) .production-table th {
  height: 42px;
  line-height: 1.08;
  vertical-align: middle;
  font-size: 14px;
  font-weight: 900;
}

body:not(.mobile-preview) .production-table th:nth-child(1),
body:not(.mobile-preview) .production-table td:nth-child(1) { width: 82px; }
body:not(.mobile-preview) .production-table th:nth-child(2),
body:not(.mobile-preview) .production-table td:nth-child(2) { width: 106px; }
body:not(.mobile-preview) .production-table th:nth-child(3),
body:not(.mobile-preview) .production-table td:nth-child(3) { width: 76px; }
body:not(.mobile-preview) .production-table th:nth-child(4),
body:not(.mobile-preview) .production-table td:nth-child(4) { width: auto; }
body:not(.mobile-preview) .production-table th:nth-child(5),
body:not(.mobile-preview) .production-table td:nth-child(5) { width: 68px; text-align: center; }
body:not(.mobile-preview) .production-table th:nth-child(6),
body:not(.mobile-preview) .production-table td:nth-child(6) { width: 78px; text-align: center; }
body:not(.mobile-preview) .production-table th:nth-child(7),
body:not(.mobile-preview) .production-table td:nth-child(7),
body:not(.mobile-preview) .production-table th:nth-child(8),
body:not(.mobile-preview) .production-table td:nth-child(8),
body:not(.mobile-preview) .production-table th:nth-child(9),
body:not(.mobile-preview) .production-table td:nth-child(9) {
  width: 72px;
  text-align: right;
}
body:not(.mobile-preview) .production-table th:nth-child(10),
body:not(.mobile-preview) .production-table td:nth-child(10) {
  width: 82px;
  text-align: center;
}
body:not(.mobile-preview) .production-table th:nth-child(11),
body:not(.mobile-preview) .production-table td:nth-child(11) {
  width: 82px;
  text-align: center;
}
body:not(.mobile-preview) .production-table th:nth-child(12),
body:not(.mobile-preview) .production-table td:nth-child(12) {
  width: 78px;
  text-align: right;
}
body:not(.mobile-preview) .production-table th:nth-child(13),
body:not(.mobile-preview) .production-table td:nth-child(13) {
  width: 92px;
  text-align: center;
}

body:not(.mobile-preview) .production-name-cell {
  white-space: normal !important;
  word-break: break-all;
  line-height: 1.28 !important;
  text-align: left;
}

body:not(.mobile-preview) .production-qr-cell img {
  display: block;
  width: 68px;
  height: 68px;
  margin: 0 auto;
  object-fit: contain;
}

body:not(.mobile-preview) .production-table .production-report-qty {
  width: 68px;
  height: 30px;
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

body:not(.mobile-preview) .production-table .secondary {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.production-order-list {
  margin-bottom: 12px;
}

.production-submit-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #c7d8f2;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #f8fbff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.35;
}

.production-submit-notice strong {
  font-size: 15px;
  font-weight: 950;
}

.production-submit-notice span {
  color: #334155;
  font-weight: 800;
}

.production-submit-notice em {
  color: #64748b;
  font-style: normal;
}

.production-submit-notice.success {
  border-color: #bbdfc6;
  border-left-color: #16a34a;
  background: #f4fbf6;
  color: #166534;
}

.production-submit-notice.error {
  border-color: #f2c7c3;
  border-left-color: #d8584a;
  background: #fffafa;
  color: #7c2d25;
}

.production-blocked-notice {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #f2c7c3;
  border-left: 5px solid #d8584a;
  border-radius: 8px;
  background: #fffafa;
  color: #7c2d25;
  font-size: 13px;
  line-height: 1.35;
}

.production-blocked-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.production-blocked-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 999px;
  background: #d8584a;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

.production-blocked-head strong {
  display: block;
  color: #7f1d1d;
  font-size: 15px;
  font-weight: 950;
}

.production-blocked-head span:last-child {
  color: #9a443a;
}

.production-blocked-reasons {
  display: grid;
  gap: 7px;
}

.production-blocked-reason {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid #f0d2ce;
  border-radius: 7px;
  background: #fff;
}

.production-blocked-reason-title {
  color: #7f1d1d;
  font-weight: 900;
}

.production-blocked-reason-main {
  color: #334155;
}

.production-blocked-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.production-blocked-tags span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff1f0;
  color: #8d2b24;
  font-size: 12px;
  font-weight: 700;
}

.production-grid.production-order-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: auto;
}

.production-order-table th,
.production-order-table td {
  height: 28px;
  padding: 3px 6px;
  font-size: 12px;
  line-height: 1.15;
  vertical-align: middle;
}

.production-order-table th:nth-child(1),
.production-order-table td:nth-child(1) {
  width: 86px;
  white-space: nowrap;
}

.production-order-table th:nth-child(2),
.production-order-table td:nth-child(2) {
  width: 58px;
  white-space: nowrap;
}

.production-order-table th:nth-child(3),
.production-order-table td:nth-child(3) {
  width: 112px;
  white-space: nowrap;
}

.production-order-table th:nth-child(4),
.production-order-table td:nth-child(4) {
  width: auto;
  white-space: normal;
  word-break: break-all;
}

.production-order-table th:nth-child(5),
.production-order-table td:nth-child(5),
.production-order-table th:nth-child(6),
.production-order-table td:nth-child(6),
.production-order-table th:nth-child(7),
.production-order-table td:nth-child(7) {
  width: 68px;
  text-align: right;
  white-space: nowrap;
}

.production-order-table th:nth-child(8),
.production-order-table td:nth-child(8) {
  width: 64px;
  text-align: center;
  white-space: normal;
}

.production-order-table .secondary {
  min-height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
}

.production-submission-shell {
  margin-top: 12px;
}

.production-grid.production-submission-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse;
}

.production-submission-table th,
.production-submission-table td {
  height: 28px;
  padding: 3px 6px;
  border: 1px solid #a9a9a9;
  font-size: 12px;
  line-height: 1.15;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-submission-table th {
  height: 34px;
  white-space: normal;
  word-break: keep-all;
  background: #f4f1eb;
}

.production-submission-table th:nth-child(1),
.production-submission-table td:nth-child(1) {
  width: 92px;
}

.production-submission-table th:nth-child(2),
.production-submission-table td:nth-child(2) {
  width: auto;
}

.production-submission-table th:nth-child(3),
.production-submission-table td:nth-child(3) {
  width: 72px;
  text-align: right;
}

.production-submission-table th:nth-child(4),
.production-submission-table td:nth-child(4) {
  width: 86px;
  text-align: center;
}

.production-submission-table th:nth-child(5),
.production-submission-table td:nth-child(5) {
  width: 64px;
  text-align: center;
}

.production-cancel-btn {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
}

.production-cancel-confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.22);
}

.production-cancel-confirm {
  width: min(360px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.production-cancel-confirm strong {
  display: block;
  color: #172033;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
}

.production-cancel-confirm p {
  margin: 8px 0 14px;
  color: #617086;
  font-size: 13px;
  line-height: 1.35;
}

.production-cancel-confirm div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.production-cancel-confirm button {
  min-height: 38px;
  border-radius: 6px;
  font-size: 14px;
}

body:not(.mobile-preview) .production-submission-table th:nth-child(1),
body:not(.mobile-preview) .production-submission-table td:nth-child(1) {
  width: 92px;
}

body:not(.mobile-preview) .production-submission-table th:nth-child(2),
body:not(.mobile-preview) .production-submission-table td:nth-child(2) {
  width: 118px;
}

body:not(.mobile-preview) .production-submission-table th:nth-child(3),
body:not(.mobile-preview) .production-submission-table td:nth-child(3) {
  width: auto;
}

body:not(.mobile-preview) .production-submission-table th:nth-child(4),
body:not(.mobile-preview) .production-submission-table td:nth-child(4),
body:not(.mobile-preview) .production-submission-table th:nth-child(5),
body:not(.mobile-preview) .production-submission-table td:nth-child(5),
body:not(.mobile-preview) .production-submission-table th:nth-child(6),
body:not(.mobile-preview) .production-submission-table td:nth-child(6) {
  width: 74px;
  text-align: center;
}

body:not(.mobile-preview) .production-submission-table th:nth-child(7),
body:not(.mobile-preview) .production-submission-table td:nth-child(7) {
  width: 74px;
  text-align: center;
}

body:not(.mobile-preview) .production-submission-table th:nth-child(8),
body:not(.mobile-preview) .production-submission-table td:nth-child(8) {
  width: 62px;
  text-align: center;
}

body:not(.mobile-preview) .production-submission-table th,
body:not(.mobile-preview) .production-submission-table td {
  height: 34px;
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1.18;
  text-align: center;
}

body:not(.mobile-preview) .production-submission-table th {
  font-size: 15px;
  font-weight: 900;
}

body:not(.mobile-preview) .production-submission-table td:nth-child(3) {
  white-space: normal;
  word-break: break-all;
  text-align: left;
}

body:not(.mobile-preview) .production-submission-table .production-cancel-btn {
  min-height: 24px;
  padding: 0 6px;
  font-size: 12px;
}

.inventory-panel {
  min-height: calc(100vh - 48px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.9)),
    linear-gradient(135deg, rgba(29, 102, 229, 0.08), rgba(14, 165, 233, 0.04));
}

.inventory-panel .panel-head {
  align-items: center;
  padding: 18px;
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.inventory-panel .panel-head h2 {
  font-size: clamp(34px, 5vw, 56px);
}

.inventory-panel .panel-head p {
  max-width: 720px;
}

body:not(.mobile-preview) .inventory-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  grid-template-areas:
    "inventory-title inventory-title"
    "inventory-search inventory-search"
    "inventory-notice inventory-notice"
    "inventory-material inventory-material"
    "inventory-records inventory-records";
  gap: 8px 12px;
  padding: 12px;
}

body:not(.mobile-preview) .inventory-panel .panel-head,
body:not(.mobile-preview) .inventory-test-grid {
  display: contents;
}

body:not(.mobile-preview) .inventory-panel .panel-head > div {
  grid-area: inventory-title;
  align-self: center;
  min-width: 0;
}

body:not(.mobile-preview) .inventory-panel .panel-head .eyebrow {
  margin-bottom: 2px;
  font-size: 10px;
}

body:not(.mobile-preview) .inventory-panel .panel-head h2 {
  font-size: 28px;
  line-height: 1.05;
}

body:not(.mobile-preview) .inventory-panel .panel-head p {
  display: none;
}

body:not(.mobile-preview) #refreshInventoryRecords {
  display: none;
}

body:not(.mobile-preview) #inventoryScanForm {
  grid-area: inventory-search;
  position: static;
  align-self: start;
  justify-self: start;
  display: grid;
  grid-template-columns: 60ch 112px;
  gap: 8px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.mobile-preview) #inventoryScanForm label {
  min-width: 0;
  gap: 0;
}

body:not(.mobile-preview) #inventoryScanForm label > span {
  display: none;
}

body:not(.mobile-preview) #inventoryScanForm input {
  height: 34px;
  width: 100%;
  padding: 0 10px;
  font-size: 15px;
}

body:not(.mobile-preview) #inventoryQrScanBtn {
  display: none;
}

body:not(.mobile-preview) #inventoryScanForm .primary {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

body:not(.mobile-preview) .inventory-access-notice {
  grid-area: inventory-notice;
  margin: 0;
}

body:not(.mobile-preview) #inventoryMaterialCard {
  grid-area: inventory-material;
}

body:not(.mobile-preview) #inventoryMaterialCard.inventory-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.mobile-preview) #inventoryMaterialCard .inventory-material-head,
body:not(.mobile-preview) #inventoryMaterialCard .inventory-stock-list {
  display: none;
}

body:not(.mobile-preview) .inventory-material-table,
body:not(.mobile-preview) .inventory-stock-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

body:not(.mobile-preview) .inventory-material-table {
  margin-bottom: 8px;
}

body:not(.mobile-preview) .inventory-material-table th,
body:not(.mobile-preview) .inventory-material-table td,
body:not(.mobile-preview) .inventory-stock-table th,
body:not(.mobile-preview) .inventory-stock-table td {
  padding: 6px 8px;
  border: 1px solid #a6a6a6;
  color: #152033;
  line-height: 1.25;
  vertical-align: middle;
}

body:not(.mobile-preview) .inventory-material-table th,
body:not(.mobile-preview) .inventory-stock-table th {
  background: #f3f0e9;
  color: #111;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

body:not(.mobile-preview) .inventory-material-table th {
  width: 90px;
}

body:not(.mobile-preview) .inventory-material-table td:first-of-type {
  width: 160px;
  font-weight: 900;
}

body:not(.mobile-preview) .inventory-stock-table-wrap {
  margin-bottom: 8px;
  overflow-x: auto;
  border: 1px solid #a9a9a9;
  border-radius: 0;
  background: #fff;
}

body:not(.mobile-preview) .inventory-stock-table input[type="radio"] {
  width: 13px;
  height: 13px;
}

body:not(.mobile-preview) .inventory-stock-table td:first-child {
  width: 38px;
  text-align: center;
}

body:not(.mobile-preview) .inventory-stock-table tbody tr:first-child td {
  background: #d8edc0;
}

body:not(.mobile-preview) .inventory-stock-table tbody tr:nth-child(even) td {
  background: #eef0f0;
}

body:not(.mobile-preview) .inventory-stock-table {
  min-width: 980px;
  width: max-content;
  font-size: 12px;
  table-layout: fixed;
}

body:not(.mobile-preview) .inventory-stock-table th,
body:not(.mobile-preview) .inventory-stock-table td {
  height: 22px;
  padding: 2px 4px;
  border-color: #a5a5a5;
  line-height: 1.15;
  white-space: nowrap;
}

body:not(.mobile-preview) .inventory-stock-table th {
  background: #f3f0e9;
  color: #000;
  font-size: 12px;
  font-weight: 500;
}

body:not(.mobile-preview) .inventory-stock-table td:nth-child(1) { width: 34px; }
body:not(.mobile-preview) .inventory-stock-table td:nth-child(2) { width: 130px; }
body:not(.mobile-preview) .inventory-stock-table td:nth-child(3) { width: 130px; }
body:not(.mobile-preview) .inventory-stock-table td:nth-child(4) { width: 68px; }
body:not(.mobile-preview) .inventory-stock-table td:nth-child(5) { width: 145px; }
body:not(.mobile-preview) .inventory-stock-table td:nth-child(6) { width: 145px; }
body:not(.mobile-preview) .inventory-stock-table td:nth-child(7) { width: 260px; }

body:not(.mobile-preview) .inventory-stock-table th:nth-child(1) { width: 34px; }
body:not(.mobile-preview) .inventory-stock-table th:nth-child(2) { width: 130px; }
body:not(.mobile-preview) .inventory-stock-table th:nth-child(3) { width: 130px; }
body:not(.mobile-preview) .inventory-stock-table th:nth-child(4) { width: 68px; }
body:not(.mobile-preview) .inventory-stock-table th:nth-child(5) { width: 145px; }
body:not(.mobile-preview) .inventory-stock-table th:nth-child(6) { width: 145px; }
body:not(.mobile-preview) .inventory-stock-table th:nth-child(7) { width: 260px; }

body:not(.mobile-preview) .inventory-stock-table .num-cell {
  font-size: 13px;
  font-weight: 900;
}

body:not(.mobile-preview) .inventory-material-table {
  font-size: 12px;
}

body:not(.mobile-preview) .inventory-material-table th,
body:not(.mobile-preview) .inventory-material-table td {
  height: 22px;
  padding: 2px 4px;
  border-color: #a5a5a5;
  line-height: 1.15;
}

body:not(.mobile-preview) .inventory-save-form {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(240px, 1fr) 180px;
  gap: 8px;
  align-items: end;
}

body:not(.mobile-preview) .inventory-save-form label {
  gap: 4px;
}

body:not(.mobile-preview) .inventory-save-form input {
  height: 34px;
  padding: 0 10px;
  font-size: 14px;
}

body:not(.mobile-preview) .inventory-save-form .primary {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

body:not(.mobile-preview) .pc-erp-inventory-table {
  min-width: 1280px;
}

body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-marker { width: 28px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-no { width: 34px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-code { width: 90px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-name { width: 360px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-unit { width: 48px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-location-name { width: 180px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-qty { width: 105px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-diff { width: 115px; }
body:not(.mobile-preview) .pc-erp-inventory-table .pc-col-note { width: 240px; }

body:not(.mobile-preview) .inventory-record-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid #86abe0;
  background: #e4f0ff;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
}

body:not(.mobile-preview) .inventory-record-toolbar strong {
  font-size: 16px;
  color: #111;
}

body:not(.mobile-preview) .inventory-record-toolbar span {
  color: #4b5563;
  font-size: 13px;
}

body:not(.mobile-preview) .inventory-record-toolbar .inventory-toolbar-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: inherit;
}

body:not(.mobile-preview) .inventory-record-toolbar .inventory-record-refresh,
body:not(.mobile-preview) .inventory-record-toolbar .inventory-record-recycle,
body:not(.mobile-preview) .inventory-record-toolbar .inventory-record-restore {
  min-height: 26px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 13px;
}

body:not(.mobile-preview) .inventory-record-toolbar .inventory-record-recycle {
  color: #1d4ed8;
  background: #eef4ff;
}

body:not(.mobile-preview) .inventory-record-toolbar .inventory-record-restore {
  color: #166534;
  background: #ecfdf3;
  border-color: #bbf7d0;
}

body:not(.mobile-preview) .pc-erp-count-form {
  margin-top: 10px;
  border: 1px solid #76a3dd;
  background: #dcecff;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
}

body:not(.mobile-preview) .pc-erp-tabs {
  display: flex;
  align-items: end;
  height: 26px;
  padding: 0 8px;
  border-bottom: 1px solid #8fb3e4;
}

body:not(.mobile-preview) .pc-erp-tabs span,
body:not(.mobile-preview) .pc-erp-tabs strong {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  border: 1px solid #9ab7df;
  border-bottom: 0;
  background: #e8f3ff;
  color: #1d4f91;
  font-size: 13px;
}

body:not(.mobile-preview) .pc-erp-tabs strong {
  background: #fff;
  color: #000;
}

body:not(.mobile-preview) .pc-erp-count-head {
  display: grid;
  grid-template-columns: 190px 190px 180px 270px 180px 180px minmax(280px, 1fr);
  gap: 6px 10px;
  align-items: center;
  padding: 10px 14px;
}

body:not(.mobile-preview) .pc-erp-count-head label,
body:not(.mobile-preview) .pc-erp-count-foot label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  min-width: 0;
}

body:not(.mobile-preview) .pc-erp-count-head span {
  color: #d60000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body:not(.mobile-preview) .pc-erp-count-head input,
body:not(.mobile-preview) .pc-erp-count-foot input {
  width: 100%;
  height: 24px;
  min-height: 24px;
  padding: 1px 5px;
  border: 1px solid #b8afa9;
  border-radius: 0;
  background: #eee;
  color: #111;
  font-size: 13px;
  box-shadow: none;
}

body:not(.mobile-preview) .pc-erp-count-form .inventory-table-wrap {
  margin: 0 14px;
  border: 1px solid #9d9d9d;
  border-radius: 0;
  background: #fff;
}

body:not(.mobile-preview) .pc-erp-count-form .inventory-table th,
body:not(.mobile-preview) .pc-erp-count-form .inventory-table td {
  height: 24px;
  padding: 2px 4px;
  border-color: #9e9e9e;
  color: #000;
  font-size: 13px;
  line-height: 1.15;
}

body:not(.mobile-preview) .pc-erp-count-form .inventory-table th {
  background: #eef4fb;
  font-weight: 500;
}

body:not(.mobile-preview) .pc-erp-count-form .inventory-table tbody tr:first-child td {
  background: #d9efc4;
}

body:not(.mobile-preview) .pc-erp-count-form .inventory-table tbody tr:nth-child(even) td {
  background: #edf0f0;
}

body:not(.mobile-preview) .pc-erp-count-form .row-marker {
  text-align: center;
  color: #333;
}

body:not(.mobile-preview) .pc-erp-count-foot {
  display: grid;
  grid-template-columns: 190px 190px 260px 260px;
  gap: 6px 28px;
  padding: 8px 110px 10px;
  background: #dcecff;
}

body:not(.mobile-preview) .pc-erp-count-foot span {
  color: #000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body:not(.mobile-preview) .pc-erp-inventory-table .inline-actions {
  display: inline-flex;
  margin-left: 8px;
  gap: 4px;
  vertical-align: middle;
}

body:not(.mobile-preview) .pc-erp-inventory-table .inline-actions .secondary {
  min-height: 20px;
  padding: 0 6px;
  border-radius: 2px;
  font-size: 12px;
}

body:not(.mobile-preview) .pc-erp-inventory-table .inventory-count-edit,
body:not(.mobile-preview) .pc-erp-inventory-table .inventory-note-edit {
  width: 100%;
  height: 22px;
  min-height: 22px;
  padding: 1px 4px;
  border: 1px solid #8f8f8f;
  border-radius: 0;
  background: #fffde8;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

body:not(.mobile-preview) .pc-erp-inventory-table .inventory-count-edit {
  text-align: right;
}

body:not(.mobile-preview) .pc-erp-inventory-table .inventory-note-cell {
  display: table-cell;
}

body:not(.mobile-preview) .pc-erp-inventory-table .inventory-note-meta {
  display: inline-block;
  margin-left: 6px;
  color: #5b6475;
  font-size: 12px;
}

body:not(.mobile-preview) .inventory-records {
  grid-area: inventory-records;
}

.mobile-inventory-title,
.scan-button {
  display: none;
}

.inventory-access-notice {
  margin: 12px 0 14px;
  padding: 10px 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f4f8ff;
  color: #37506f;
  font-size: 14px;
  font-weight: 800;
}

.inventory-test-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.inventory-card {
  padding: 18px;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

#inventoryScanForm {
  position: sticky;
  top: 18px;
}

#inventoryScanForm input {
  height: 56px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

#inventoryScanForm .primary,
.inventory-save-form .primary {
  width: 100%;
  min-height: 56px;
  font-size: 18px;
}

.inventory-card form,
.inventory-save-form {
  display: grid;
  gap: 14px;
}

.inventory-material-head h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0;
}

.inventory-material-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.inventory-stock-list {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.inventory-stock-head {
  display: grid;
  grid-template-columns: 24px 70px 82px 58px 90px 96px minmax(120px, 1fr);
  gap: 8px;
  min-width: 620px;
  padding: 6px 10px;
  border: 1px solid #a6a6a6;
  border-bottom: 0;
  color: #111;
  background: #f3f0e9;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.inventory-stock-row {
  display: grid;
  grid-template-columns: auto 70px 82px 58px 90px 96px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 620px;
  padding: 6px 10px;
  border: 1px solid #a6a6a6;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
}

.inventory-stock-row input {
  width: 18px;
  height: 18px;
}

.inventory-stock-row span,
.inventory-record span {
  display: grid;
  gap: 4px;
}

.inventory-stock-row small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-stock-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.inventory-records {
  margin-top: 18px;
}

body:not(.mobile-preview) .inventory-panel .inventory-records {
  margin-top: 8px;
}

body:not(.mobile-preview) .inventory-panel .inventory-table-shell {
  border: 1px solid #a9a9a9;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body:not(.mobile-preview) .inventory-panel .inventory-table-title {
  padding: 6px 8px;
  border-bottom: 4px solid #8c8c8c;
  background: #f3f0e9;
}

body:not(.mobile-preview) .inventory-panel .inventory-table-title strong {
  font-size: 16px;
  font-weight: 900;
}

body:not(.mobile-preview) .inventory-panel .inventory-table-title span {
  font-size: 13px;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-refresh {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 2px;
  font-size: 12px;
}

body:not(.mobile-preview) .inventory-panel .inventory-table {
  min-width: 1580px;
  width: max-content;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
  font-size: 12px;
}

body:not(.mobile-preview) .inventory-panel .inventory-table th,
body:not(.mobile-preview) .inventory-panel .inventory-table td {
  height: 22px;
  padding: 2px 4px;
  border: 1px solid #a5a5a5;
  line-height: 1.15;
  white-space: nowrap;
}

body:not(.mobile-preview) .inventory-panel .inventory-table th {
  background: #f3f0e9;
  color: #000;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

body:not(.mobile-preview) .inventory-panel .inventory-table tbody tr:first-child td {
  background: #d7edc1;
}

body:not(.mobile-preview) .inventory-panel .inventory-table tbody tr:nth-child(even) td {
  background: #eef0f0;
}

body:not(.mobile-preview) .inventory-panel .inventory-table tbody tr:hover td {
  background: #d7e8fb;
}

body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-no { width: 44px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-code { width: 96px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-name { width: 430px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-unit { width: 48px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-qty { width: 108px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-diff { width: 120px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-location-code { width: 96px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-location-name { width: 180px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-status { width: 74px; }
body:not(.mobile-preview) .inventory-panel .inventory-table .inv-col-action { width: 88px; }

body:not(.mobile-preview)[data-inventory-access="review"] .inventory-panel .inventory-table {
  min-width: 2290px;
}

body:not(.mobile-preview) .inventory-panel .inventory-table .wide-cell {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-table-shell {
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.inventory-table-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 4px solid #8d9297;
  color: #172033;
  background: #f3f6fb;
}

.inventory-table-title strong {
  font-size: 20px;
  font-weight: 950;
}

.inventory-table-title span {
  color: #617086;
  font-size: 16px;
  font-weight: 900;
}

.inventory-table-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.inventory-record-refresh {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

.inventory-table-wrap {
  overflow-x: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.inventory-table {
  min-width: 1420px;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

.inventory-table th,
.inventory-table td {
  padding: 4px 6px;
  border: 1px solid #a6a6a6;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.25;
}

.inventory-table th {
  background: #f3f0e9;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.inventory-table thead tr:first-child th {
  border-bottom-color: #8b8b8b;
}

.inventory-table tbody tr:first-child td {
  background: #d8edc0;
}

.inventory-table tbody tr:nth-child(even) td {
  background: #eef0f0;
}

.inventory-table tbody tr:hover td {
  background: #dcecff;
}

.inventory-table .inv-col-no { width: 38px; }
.inventory-table .inv-col-code { width: 86px; }
.inventory-table .inv-col-name { width: 230px; }
.inventory-table .inv-col-unit { width: 54px; }
.inventory-table .inv-col-qty { width: 92px; }
.inventory-table .inv-col-diff { width: 104px; }
.inventory-table .inv-col-location-code { width: 96px; }
.inventory-table .inv-col-location-name { width: 210px; }
.inventory-table .inv-col-status { width: 78px; }
.inventory-table .inv-col-action { width: 96px; }
.inventory-table .inv-col-count-no { width: 150px; }
.inventory-table .inv-col-warehouse { width: 150px; }
.inventory-table .inv-col-user { width: 100px; }
.inventory-table .inv-col-time { width: 150px; }
.inventory-table .inv-col-note { width: 220px; }

body[data-inventory-access="review"] .inventory-panel .inventory-table {
  min-width: 2290px;
}

.inventory-table .wide-cell {
  min-width: 260px;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.diff-cell {
  color: #b42318;
  font-weight: 900;
}

.inventory-status {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.inventory-status.pending {
  background: #eef4ff;
  color: #2563eb;
}

.inventory-status.approved {
  background: #e9f8ef;
  color: #16803d;
}

.inventory-status.rejected {
  background: #fff0f0;
  color: #b42318;
}

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

.mobile-preview .panel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 10px 12px 12px;
}

.mobile-preview .login-band,
.mobile-preview #queryPanel {
  border-color: #cbd8ea;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: none;
}

.mobile-preview .login-band {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 214px;
  margin: 0 -10px;
  padding: 24px 20px 56px;
  overflow: hidden;
  border: 0;
  border-radius: 0 0 8px 8px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 72% 0%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(135deg, #2e7bf0 0%, #53b6ff 52%, #a9f0f2 100%);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.mobile-preview:not(.mobile-logged-in) .login-band {
  min-height: 100vh;
  margin: 0;
  padding: 76px 16px 24px;
  align-content: start;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(165deg, transparent 0 35%, rgba(247, 251, 255, 0.98) 35.2% 100%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0 18%, transparent 18.2% 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #123f9d 0%, #266ae6 46%, #68c9f2 100%);
  background-size: auto, auto, 26px 26px, 26px 26px, auto;
}

.mobile-preview:not(.mobile-logged-in) .login-copy {
  margin-top: 0;
  grid-template-columns: 1fr;
  gap: 8px;
  width: min(720px, calc(100vw - 64px));
  justify-self: center;
  min-height: 150px;
}

.mobile-preview:not(.mobile-logged-in) .login-form {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: min(504px, calc(100vw - 132px));
  justify-self: center;
  box-sizing: border-box;
  padding: 38px 63px 43px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.95));
  box-shadow: 0 24px 58px rgba(15, 43, 98, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mobile-preview:not(.mobile-logged-in) .login-form label,
.mobile-preview:not(.mobile-logged-in) .login-form label:nth-child(1),
.mobile-preview:not(.mobile-logged-in) .login-form label:nth-child(2),
.mobile-preview:not(.mobile-logged-in) .login-form label:nth-child(3) {
  grid-column: auto;
  grid-row: auto;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 10px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid #eef2f7;
  color: transparent;
}

.mobile-preview:not(.mobile-logged-in) .login-form label:nth-child(1)::before {
  content: "ID";
}

.mobile-preview:not(.mobile-logged-in) .login-form label:nth-child(2)::before {
  content: "PW";
}

.mobile-preview:not(.mobile-logged-in) .login-form label:nth-child(3)::before {
  content: "DB";
}

.mobile-preview:not(.mobile-logged-in) .login-form label::before {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  color: #6c88b8;
  background: #f7fbff;
  font-size: 10px;
  font-weight: 950;
  text-align: center;
}

.mobile-preview:not(.mobile-logged-in) .login-form label > span {
  display: none;
}

.mobile-preview:not(.mobile-logged-in) .login-form input,
.mobile-preview:not(.mobile-logged-in) .login-form select {
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #12213a;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 800;
}

.mobile-preview:not(.mobile-logged-in) .password-field {
  width: 100%;
}

.mobile-preview:not(.mobile-logged-in) .password-field input {
  padding-right: 42px;
}

.mobile-preview:not(.mobile-logged-in) .password-toggle {
  right: 0;
  width: 32px;
  height: 30px;
  color: #6c88b8;
  background: #eef5ff;
}

.mobile-preview:not(.mobile-logged-in) .remember-login {
  display: none;
}

.mobile-preview:not(.mobile-logged-in) .remember-login input {
  width: 16px;
  min-width: 16px;
  height: 16px;
}

.mobile-preview:not(.mobile-logged-in) .login-form .primary {
  grid-column: auto;
  grid-row: auto;
  min-height: 54px;
  margin-top: 12px;
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 0.24em;
  background: linear-gradient(135deg, #1d5fe8, #5b8cf5 54%, #5bd8f2);
  box-shadow: 0 16px 30px rgba(29, 95, 232, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.mobile-preview:not(.mobile-logged-in) .login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

@media (max-width: 520px) {
  .mobile-preview:not(.mobile-logged-in) .login-copy,
  .mobile-preview:not(.mobile-logged-in) .login-form {
    width: calc(100vw - 96px);
  }

  .mobile-preview:not(.mobile-logged-in) .login-form {
    padding: 31px 31px 36px;
  }

  .mobile-preview:not(.mobile-logged-in) .mobile-company-name {
    font-size: 24px;
  }
}

.mobile-preview .login-copy {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
}

.mobile-company-logo,
.mobile-company-name,
.mobile-login-ai-lockup,
.mobile-ai-title {
  display: none;
}

.mobile-preview .mobile-company-logo {
  grid-row: 1 / span 4;
  display: block;
  width: 52px;
  height: 52px;
  padding: 3px;
  object-fit: contain;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(14, 79, 185, 0.18);
}

.mobile-preview .mobile-company-name {
  display: block;
  color: #153154;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0;
}

.mobile-preview .mobile-ai-title {
  display: block;
  color: #153154;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.mobile-preview .mobile-login-ai-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
}

.mobile-preview .mobile-login-ai-lockup img {
  width: 34px;
  height: 34px;
  padding: 2px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 20px rgba(38, 109, 220, 0.18);
}

.mobile-preview:not(.mobile-logged-in) .mobile-company-logo {
  display: none;
}

.mobile-preview:not(.mobile-logged-in) .mobile-company-name {
  color: #fff;
  font-size: 28px;
  line-height: 1.24;
  max-width: 720px;
  word-break: keep-all;
  text-shadow: 0 10px 26px rgba(6, 28, 76, 0.32);
}

.mobile-preview:not(.mobile-logged-in) .mobile-company-name::before {
  content: "\6b22\8fce\767b\5f55\ff0c";
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 500;
}

.mobile-preview:not(.mobile-logged-in) .mobile-ai-title {
  color: rgba(255, 255, 255, 0.94);
  font-size: 21px;
  letter-spacing: 0.06em;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-ai-lockup {
  margin-top: 4px;
}

.mobile-preview .login-copy .eyebrow {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
}

.mobile-preview:not(.mobile-logged-in) .login-copy .eyebrow,
.mobile-preview:not(.mobile-logged-in) .login-copy h2 {
  display: none;
}

.mobile-preview .login-copy h2 {
  color: #153154;
  font-size: 16px;
  line-height: 1.1;
}

.mobile-preview .login-copy p {
  display: none;
}

.mobile-preview .panel-head,
.mobile-preview .ask-form,
.mobile-preview .insight-strip,
.mobile-preview .quick-query-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.mobile-preview .login-form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(202, 219, 242, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(14, 79, 185, 0.16);
}

.mobile-preview .login-form label:nth-child(1) {
  grid-column: 1 / 4;
  grid-row: 1;
}

.mobile-preview .login-form label:nth-child(2) {
  grid-column: 4 / 7;
  grid-row: 1;
}

.mobile-preview .login-form label:nth-child(3) {
  grid-column: 1 / 5;
  grid-row: 2;
}

.mobile-preview .login-error {
  grid-column: 1 / -1;
  box-sizing: border-box;
  max-width: 100%;
  margin-top: 10px;
}

.mobile-preview .login-form label {
  gap: 5px;
  color: #334155;
  font-size: 12px;
}

.mobile-preview .login-form input,
.mobile-preview .login-form select {
  height: 40px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
}

.mobile-preview .remember-login {
  grid-column: 1 / 4;
  grid-row: 3;
  height: 30px;
  gap: 7px;
  font-size: 13px;
}

.mobile-preview .remember-login input {
  width: 18px;
  min-width: 18px;
}

.mobile-preview .login-form .primary {
  grid-column: 5 / 7;
  grid-row: 2;
  min-height: 40px;
  padding: 0 12px;
  font-size: 16px;
}

.mobile-login-extra {
  display: none;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra {
  display: grid;
  gap: 22px;
  justify-items: center;
  margin-top: 30px;
  color: #a4afbd;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra span {
  position: relative;
  font-size: 13px;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra span::before,
.mobile-preview:not(.mobile-logged-in) .mobile-login-extra span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 58px;
  height: 1px;
  background: #e2e8f0;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra span::before {
  right: calc(100% + 12px);
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra span::after {
  left: calc(100% + 12px);
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra div {
  display: flex;
  gap: 12px;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra i {
  width: 72px;
  min-height: 86px;
  padding: 0;
  display: grid;
  gap: 8px;
  place-items: center;
  color: #4b5b70;
  background: transparent;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  font-style: normal;
  font-weight: 900;
  box-shadow: none;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra i b {
  font-style: normal;
  font-weight: 900;
}

.biz-scope-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2aa7e8, #1d5fe8);
  box-shadow: 0 14px 26px rgba(68, 128, 224, 0.24);
}

.biz-scope-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-icon {
  background: linear-gradient(135deg, #4f7df0, #293fc4);
}

.count-icon {
  background: linear-gradient(135deg, #32d2b3, #158f72);
}

.quality-icon {
  background: linear-gradient(135deg, #7c8df5, #8656d8);
}

.query-module,
.inventory-module,
.production-module,
.quality-module {
  min-width: 0;
}

.quality-module .branch-placeholder-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid #d7e4f6;
  border-radius: 8px;
  background: #fff;
  color: #4b5c75;
}

.quality-module .branch-placeholder-card strong {
  color: #172033;
  font-size: 22px;
  font-weight: 950;
}

.mobile-dashboard {
  display: none;
}

.mobile-preview .mobile-dashboard {
  width: 100vw;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: grid;
  gap: 7px;
  margin-top: 0;
  padding: 6px 10px 8px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #f6fbff;
  border-bottom: 1px solid #d6e4f5;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.mobile-home-header {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  gap: 6px;
  padding: 9px 10px 8px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.94));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.mobile-home-brand {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.mobile-home-ai-lockup {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mobile-home-brand img {
  width: 28px;
  height: 28px;
  padding: 2px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.mobile-home-brand strong {
  min-width: 0;
  display: block;
  color: #12213a;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
  white-space: normal;
  word-break: keep-all;
}

.mobile-home-ai-lockup span {
  display: block;
  color: #3a6fd8;
  font-size: 15px;
  font-weight: 950;
}

.mobile-home-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  color: #526176;
  background: #f3f7ff;
  font-size: 11px;
  font-weight: 800;
}

.mobile-home-session b {
  color: #172033;
}

.mobile-home-session span {
  min-width: 0;
}

.mobile-home-logout {
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #c7d8f5;
  border-radius: 999px;
  color: #315fc6;
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.1);
}

.mobile-home-logout:active {
  transform: translateY(1px);
}

.mobile-shortcuts {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid #e3ecf7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.mobile-shortcuts button,
.mobile-service-grid button,
.mobile-feature-card,
.mobile-section-head button {
  cursor: pointer;
}

.mobile-shortcuts button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 48px;
  color: #152238;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.mobile-shortcuts button[hidden] {
  display: none !important;
}

.mobile-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 9px 18px rgba(15, 23, 42, 0.12);
}

.mobile-icon.blue { background: linear-gradient(135deg, #3f7df3, #70c0ff); }
.mobile-icon.cyan { background: linear-gradient(135deg, #22b8cf, #8ce8ef); }
.mobile-icon.gold { background: linear-gradient(135deg, #f4b23a, #ffd884); }
.mobile-icon.green { background: linear-gradient(135deg, #16a673, #8de6b6); }

.mobile-shortcuts .biz-scope-icon {
  width: 32px;
  height: 32px;
}

.mobile-shortcuts .biz-scope-icon svg {
  width: 18px;
  height: 18px;
}

.branch-placeholder-panel {
  min-height: 360px;
}

.branch-placeholder-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 28px 18px;
  border: 1px solid #e3ecf7;
  border-radius: 8px;
  color: #4a5870;
  text-align: center;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
}

.branch-placeholder-card strong {
  color: #12213a;
  font-size: 20px;
}

.branch-placeholder-card span {
  font-size: 13px;
  font-weight: 800;
}

.mobile-mini-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.mobile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #172033;
  font-size: 16px;
}

.mobile-section-head strong::before {
  content: "";
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f7df3, #89e8f2);
}

.mobile-section-head button {
  color: #7b8796;
  background: transparent;
  font-weight: 800;
}

.mobile-feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-feature-card {
  min-height: 86px;
  padding: 14px;
  display: grid;
  gap: 12px;
  justify-items: start;
  border-radius: 8px;
  text-align: left;
}

.mobile-feature-card strong {
  font-size: 16px;
}

.mobile-feature-card span {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.72;
}

.mobile-feature-card.blue {
  color: #1d5ca8;
  background: linear-gradient(135deg, #edf7ff, #dff1ff);
}

.mobile-feature-card.orange {
  color: #a76013;
  background: linear-gradient(135deg, #fff6e9, #fff0da);
}

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

.mobile-service-grid button {
  min-height: 62px;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #46566b;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.mobile-service-grid span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #d4e0ee;
  border-radius: 8px;
  color: #2c5eb8;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 900;
}

.mobile-preview #queryPanel {
  padding: 10px;
  border-color: #e1ebf5;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.mobile-preview .inbox-panel {
  gap: 8px;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.mobile-preview .inbox-head {
  flex-direction: row;
  align-items: center;
}

.mobile-preview .inbox-head .eyebrow {
  display: none;
}

.mobile-preview .inbox-head h2 {
  font-size: 20px;
}

.mobile-preview .inbox-head .secondary {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 8px;
}

.mobile-preview .inbox-summary {
  display: none;
}

.mobile-preview .inbox-table-wrap {
  max-height: 220px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-preview .query-pane {
  padding-top: 2px;
  border-top: 1px solid #eef3f8;
}

.mobile-preview .ask-form {
  gap: 8px;
  margin-bottom: 10px;
}

.mobile-preview .ask-form label {
  gap: 5px;
}

.mobile-preview .question-input-wrap textarea {
  min-height: 68px;
  padding: 10px 96px 10px 10px;
  font-size: 14px;
}

.mobile-preview .question-help-trigger {
  top: 8px;
  right: 8px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.mobile-preview .ask-form .primary {
  width: 100%;
  height: 46px;
}

.mobile-preview .inventory-panel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: auto;
  padding: 8px;
}

.mobile-preview .inventory-panel .panel-head {
  display: none;
}

.mobile-preview .mobile-inventory-title {
  display: block;
  margin: 0 0 8px;
  color: #12213a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.15;
}

.mobile-preview .inventory-test-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.mobile-preview #inventoryScanForm {
  position: static;
}

.mobile-preview .inventory-card {
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.mobile-preview #inventoryScanForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.mobile-preview #inventoryScanForm label {
  grid-column: 1 / -1;
}

.mobile-preview #inventoryScanForm input {
  height: 44px;
  font-size: 18px;
}

.mobile-preview .scan-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #1d4ed8;
  background: #eef4ff;
}

.mobile-preview #inventoryScanForm .primary,
.mobile-preview .inventory-save-form .primary {
  min-height: 44px;
  font-size: 15px;
}

.mobile-preview .inventory-records {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  margin-top: 10px;
}

.mobile-preview .inventory-material-table,
.mobile-preview .inventory-stock-table-wrap {
  display: none;
}

.mobile-preview .inventory-table-shell {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.mobile-preview .mobile-inventory-count-card {
  overflow: hidden;
  border: 1px solid #c7d6ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-preview .mobile-count-name {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  min-height: 30px;
  border-bottom: 1px solid #dbe4f0;
}

.mobile-preview .mobile-count-name span,
.mobile-preview .mobile-count-name b,
.mobile-preview .mobile-count-grid span,
.mobile-preview .mobile-count-grid b,
.mobile-preview .mobile-count-grid input,
.mobile-preview .mobile-stock-select span,
.mobile-preview .mobile-stock-select select {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  color: #111827;
  font-size: 12px;
  line-height: 1.12;
}

.mobile-preview .mobile-count-name span,
.mobile-preview .mobile-count-grid span,
.mobile-preview .mobile-stock-select span {
  justify-content: center;
  background: #f4f7fb;
  color: #475569;
  font-weight: 900;
  text-align: center;
}

.mobile-preview .mobile-count-name b {
  display: flex;
  align-items: center;
  max-height: none;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}

.mobile-preview .mobile-count-grid {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 88px minmax(0, 1fr);
}

.mobile-preview .mobile-count-grid span,
.mobile-preview .mobile-count-grid b,
.mobile-preview .mobile-count-grid input {
  min-height: 32px;
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
}

.mobile-preview .mobile-count-name span,
.mobile-preview .mobile-count-name b,
.mobile-preview .mobile-count-grid span {
  white-space: nowrap;
}

.mobile-preview .mobile-count-grid b {
  background: #fff;
  font-weight: 900;
  word-break: break-all;
}

.mobile-preview .mobile-count-grid .num-cell,
.mobile-preview .mobile-count-grid input[type="number"] {
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mobile-preview .mobile-count-grid input {
  width: 100%;
  height: auto;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background: #fff;
}

.mobile-preview .mobile-count-grid > :nth-child(4n) {
  border-right: 0;
}

.mobile-preview .mobile-stock-select {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  border-bottom: 1px solid #dbe4f0;
}

.mobile-preview .mobile-stock-select select {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: #fff;
  font-weight: 900;
}

.mobile-preview .mobile-inventory-count-card .primary {
  width: calc(100% - 20px);
  min-height: 38px;
  margin: 8px 10px;
  font-size: 14px;
}

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

.mobile-preview .mobile-inventory-record-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 4px;
  padding: 2px 2px 4px;
}

.mobile-preview .mobile-inventory-record-head strong {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.mobile-preview .mobile-inventory-record-head span {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.mobile-preview .mobile-inventory-record-head .inventory-record-refresh {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
}

.mobile-preview .mobile-inventory-record-head .inventory-record-clear {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  color: #b42318;
  background: #fff1f0;
  border-color: #fecaca;
}

.mobile-preview .mobile-inventory-simple-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #9a9a9a;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.mobile-preview .mobile-inventory-simple-table {
  width: 520px;
  min-width: 520px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  color: #111827;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
}

.mobile-preview .mobile-inventory-simple-table th,
.mobile-preview .mobile-inventory-simple-table td {
  height: 30px;
  min-height: 30px;
  padding: 1px 3px;
  border-right: 1px solid #9a9a9a;
  border-bottom: 1px solid #9a9a9a;
  font-size: 11px;
  line-height: 1.08;
  vertical-align: middle;
}

.mobile-preview .mobile-inventory-simple-table th {
  height: 32px;
  background: #f3f1ec;
  color: #111827;
  font-weight: 900;
  text-align: center;
  white-space: normal;
}

.mobile-preview .mobile-inventory-simple-table tbody tr:nth-child(odd) td {
  background: #e4f3cd;
}

.mobile-preview .mobile-inventory-simple-table tbody tr:nth-child(even) td {
  background: #f6f8f8;
}

.mobile-preview .mobile-inventory-simple-table tbody tr:first-child td {
  background: #dff0c9;
}

.mobile-preview .mobile-inventory-simple-table td:last-child,
.mobile-preview .mobile-inventory-simple-table th:last-child {
  border-right: 0;
}

.mobile-preview .mobile-inventory-simple-table .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mobile-preview .mobile-inventory-simple-table .mobile-product-name,
.mobile-preview .mobile-inventory-simple-table .mobile-reason-cell {
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
}

.mobile-preview .mobile-inventory-simple-table .mobile-product-name span {
  display: -webkit-box;
  max-height: 28px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mobile-preview .mobile-inventory-simple-table .mobile-product-name {
  font-weight: 800;
}

.mobile-preview .mobile-inventory-simple-table .mobile-col-index { width: 26px; }
.mobile-preview .mobile-inventory-simple-table .mobile-col-code { width: 56px; }
.mobile-preview .mobile-inventory-simple-table .mobile-col-name { width: 150px; }
.mobile-preview .mobile-inventory-simple-table .mobile-col-unit { width: 24px; }
.mobile-preview .mobile-inventory-simple-table .mobile-col-qty { width: 62px; }
.mobile-preview .mobile-inventory-simple-table .mobile-col-diff { width: 62px; }
.mobile-preview .mobile-inventory-simple-table .mobile-col-reason { width: 78px; }

.mobile-preview .mobile-inventory-record-card {
  overflow: hidden;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.mobile-preview .mobile-inventory-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #dbe4f0;
  background: linear-gradient(90deg, #f8fbff, #fff);
}

.mobile-preview .mobile-inventory-card-top b {
  min-width: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-preview .mobile-inventory-card-name {
  display: -webkit-box;
  padding: 8px 10px;
  border-bottom: 1px solid #dbe4f0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.28;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mobile-preview .mobile-inventory-qty-grid,
.mobile-preview .mobile-inventory-meta-grid {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px minmax(0, 1fr);
}

.mobile-preview .mobile-inventory-qty-grid span,
.mobile-preview .mobile-inventory-qty-grid b,
.mobile-preview .mobile-inventory-meta-grid span,
.mobile-preview .mobile-inventory-meta-grid b {
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 5px 7px;
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
  color: #111827;
  font-size: 13px;
  line-height: 1.18;
  overflow: hidden;
}

.mobile-preview .mobile-inventory-qty-grid span,
.mobile-preview .mobile-inventory-meta-grid span {
  justify-content: center;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
}

.mobile-preview .mobile-inventory-qty-grid b {
  justify-content: flex-end;
  background: #fff;
  font-size: 16px;
  font-weight: 900;
}

.mobile-preview .mobile-inventory-meta-grid b {
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}

.mobile-preview .mobile-inventory-qty-grid > :nth-child(4n),
.mobile-preview .mobile-inventory-meta-grid > :nth-child(4n) {
  border-right: 0;
}

.mobile-preview .mobile-inventory-note {
  padding: 7px 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  background: #fbfdff;
}

.mobile-preview .inventory-stock-row {
  position: relative;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #c8d6ea;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  font-size: 11px;
  line-height: 1.2;
}

.mobile-preview .inventory-stock-head {
  display: none;
}

.mobile-preview .inventory-stock-row {
  min-width: 0;
}

.mobile-preview .inventory-stock-list {
  gap: 7px;
  overflow-x: visible;
}

.mobile-preview .inventory-stock-row input {
  grid-row: 1 / span 3;
  width: 16px;
  height: 16px;
}

.mobile-preview .inventory-stock-row small {
  grid-column: 2 / 4;
  color: #66758c;
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
  word-break: break-all;
}

.mobile-preview .inventory-stock-row b {
  min-width: 0;
  color: #16223a;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.mobile-preview .inventory-stock-row b:nth-of-type(1)::before { content: "仓库 "; color: #75849b; font-weight: 800; }
.mobile-preview .inventory-stock-row b:nth-of-type(2)::before { content: "储位 "; color: #75849b; font-weight: 800; }
.mobile-preview .inventory-stock-row b:nth-of-type(3)::before { content: "单位 "; color: #75849b; font-weight: 800; }
.mobile-preview .inventory-stock-row b:nth-of-type(4)::before { content: "库存 "; color: #75849b; font-weight: 800; }
.mobile-preview .inventory-stock-row b:nth-of-type(5)::before { content: "换算 "; color: #75849b; font-weight: 800; }

.mobile-preview .inventory-stock-row .num-cell {
  justify-self: end;
  color: #0f172a;
  font-size: 13px;
}

.mobile-preview .inventory-stock-row .convert-cell {
  justify-self: end;
  color: #52637b;
}

.mobile-preview .inventory-material-head h3 {
  font-size: 30px;
}

.mobile-preview .inventory-material-head p {
  font-size: 14px;
  line-height: 1.35;
}

.mobile-preview .inventory-table-title {
  padding: 5px 8px;
}

.mobile-preview .inventory-table-title strong {
  font-size: 14px;
}

.mobile-preview .inventory-table-title span {
  font-size: 11px;
}

.mobile-preview .inventory-table-wrap {
  overflow: visible;
}

.mobile-preview .inventory-table {
  min-width: 0;
  display: block;
  font-size: 12px;
}

.mobile-preview .inventory-table thead {
  display: none;
}

.mobile-preview .inventory-table tbody {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.mobile-preview .inventory-table tr {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.mobile-preview .inventory-table th,
.mobile-preview .inventory-table td {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  white-space: normal;
  background: transparent !important;
  line-height: 1.35;
}

.mobile-preview .inventory-table td::before {
  flex: 0 0 auto;
  color: #64748b;
  font-weight: 900;
}

.mobile-preview .inventory-table td:nth-child(1)::before { content: "ID"; }
.mobile-preview .inventory-table td:nth-child(2)::before { content: "编码"; }
.mobile-preview .inventory-table td:nth-child(3)::before { content: "品名"; }
.mobile-preview .inventory-table td:nth-child(4)::before { content: "单位"; }
.mobile-preview .inventory-table td:nth-child(5)::before { content: "仓库数量"; }
.mobile-preview .inventory-table td:nth-child(6)::before { content: "盘点数量"; }
.mobile-preview .inventory-table td:nth-child(7)::before { content: "盘点盈亏数量"; }
.mobile-preview .inventory-table td:nth-child(8)::before { content: "仓库重量"; }
.mobile-preview .inventory-table td:nth-child(9)::before { content: "盘点重量"; }
.mobile-preview .inventory-table td:nth-child(10)::before { content: "重量盘盈亏"; }
.mobile-preview .inventory-table td:nth-child(11)::before { content: "储位编码"; }
.mobile-preview .inventory-table td:nth-child(12)::before { content: "储位名称"; }
.mobile-preview .inventory-table td:nth-child(13)::before { content: "状态"; }
.mobile-preview .inventory-table td:nth-child(14)::before { content: "操作"; }

.mobile-preview .inventory-table td:nth-child(3),
.mobile-preview .inventory-table td:nth-child(12) {
  display: grid;
  gap: 3px;
}

.mobile-preview .inventory-table .wide-cell {
  min-width: 0;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.mobile-preview .inventory-actions {
  width: 100%;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-end;
}

.mobile-preview .inventory-actions .secondary {
  min-height: 34px;
  padding: 0 12px;
}

.mobile-preview .inventory-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-height: 360px;
  overflow: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.mobile-preview .inventory-table {
  display: table;
  width: 600px;
  min-width: 600px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 8px;
}

.mobile-preview .inventory-table thead {
  display: table-header-group;
}

.mobile-preview .inventory-table tbody {
  display: table-row-group;
  padding: 0;
}

.mobile-preview .inventory-table tr {
  display: table-row;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mobile-preview .inventory-table th,
.mobile-preview .inventory-table td {
  display: table-cell;
  padding: 1px 2px;
  border: 1px solid #a6a6a6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  background: inherit !important;
  line-height: 1.05;
}

.mobile-preview .inventory-table th {
  background: #f3f0e9 !important;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.18;
  white-space: normal;
  word-break: keep-all;
  position: sticky;
  top: 0;
  z-index: 2;
}

.mobile-preview .inventory-table td::before {
  content: none !important;
}

.mobile-preview .inventory-table tbody tr:first-child td {
  background: #d8edc0 !important;
}

.mobile-preview .inventory-table tbody tr:nth-child(even) td {
  background: #eef0f0 !important;
}

.mobile-preview .inventory-table .wide-cell {
  min-width: 0;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-all;
  line-height: 1.04;
}

.mobile-preview .inventory-table .inv-name-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-all;
  line-height: 1.12;
}

.mobile-preview .inventory-table col.inv-col-no { width: 18px !important; }
.mobile-preview .inventory-table col.inv-col-code { width: 46px !important; }
.mobile-preview .inventory-table col.inv-col-name { width: 86px !important; }
.mobile-preview .inventory-table col.inv-col-unit { width: 20px !important; }
.mobile-preview .inventory-table col.inv-col-qty { width: 42px !important; }
.mobile-preview .inventory-table col.inv-col-diff { width: 44px !important; }
.mobile-preview .inventory-table col.inv-col-location-code { width: 42px !important; }
.mobile-preview .inventory-table col.inv-col-location-name { width: 62px !important; }
.mobile-preview .inventory-table col.inv-col-status { width: 34px !important; }
.mobile-preview .inventory-table col.inv-col-action { width: 30px !important; }

.mobile-preview .production-panel {
  padding: 10px;
  background: #f8fbff;
}

.mobile-preview .production-panel .panel-head {
  padding: 0 0 8px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.mobile-preview .production-panel .panel-head .eyebrow,
.mobile-preview .production-panel .panel-head p {
  display: none;
}

.mobile-preview .production-panel .panel-head h2 {
  font-size: 22px;
  line-height: 1.2;
}

.mobile-preview .production-panel .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.mobile-preview .production-refresh-btn {
  min-width: 70px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
}

.mobile-preview .production-form {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: #fff;
  align-items: stretch;
}

.mobile-preview .production-form label {
  gap: 5px;
}

.mobile-preview .production-form > * {
  width: 100%;
  justify-self: stretch;
}

.mobile-preview .production-order-field {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.mobile-preview .production-field-label {
  display: none;
}

.mobile-preview .production-input-row {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-preview .production-input-row input {
  grid-column: 1 / 4;
  grid-row: 1;
}

.mobile-preview .production-input-row .primary {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
}

.mobile-preview .production-form input,
.mobile-preview .production-form select,
.mobile-preview .production-form .secondary,
.mobile-preview .production-form .primary {
  min-height: 44px;
  font-size: 15px;
}

.mobile-preview #productionQrScanBtn,
.mobile-preview #productionOrderListBtn {
  width: 100%;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: 14px;
}

.mobile-preview #productionOrderListBtn {
  grid-column: 3 / 5;
  grid-row: 2;
}

.mobile-preview #productionQrScanBtn {
  grid-column: 1 / 3;
  grid-row: 2;
}

.mobile-preview #productionSalesOrderNo {
  min-width: 0;
  font-size: 13px;
  padding-left: 8px;
  padding-right: 8px;
}

.mobile-preview #productionConfirmBtn {
  width: 100%;
  grid-column: 4;
  grid-row: 1;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
}

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

.mobile-preview .production-order-field {
  grid-column: 1 / -1;
}

.mobile-preview .production-summary {
  margin: 8px 0;
  gap: 4px;
  font-size: 12px;
}

.mobile-preview .production-workshop-picker {
  padding: 10px;
}

.mobile-preview .production-workshop-head {
  align-items: start;
  margin-bottom: 8px;
}

.mobile-preview .production-workshop-head strong {
  font-size: 14px;
}

.mobile-preview .production-workshop-head span {
  font-size: 11px;
}

.mobile-preview .production-workshop-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.mobile-preview .production-workshop-choice {
  min-height: 54px;
  padding: 8px;
}

.mobile-preview .production-workshop-choice strong {
  font-size: 13px;
}

.mobile-preview .production-workshop-choice span {
  font-size: 11px;
}

.mobile-preview .production-table-shell {
  border: 0;
  background: transparent;
}

.mobile-preview .production-table thead {
  display: none;
}

.mobile-preview .production-table,
.mobile-preview .production-table tbody,
.mobile-preview .production-table tr {
  display: block;
  width: 100%;
}

.mobile-preview .production-table tr {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: #fff;
}

.mobile-preview .production-table td {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  border: 0;
  font-size: 12px;
  white-space: normal;
}

.mobile-preview .production-table td::before {
  color: #64748b;
  font-weight: 800;
}

.mobile-preview .production-table td:nth-child(1)::before { content: "订单"; }
.mobile-preview .production-table td:nth-child(2)::before { content: "工令"; }
.mobile-preview .production-table td:nth-child(3)::before { content: "产品"; }
.mobile-preview .production-table td:nth-child(4)::before { content: "品名"; }
.mobile-preview .production-table td:nth-child(5)::before { content: "工序"; }
.mobile-preview .production-table td:nth-child(6)::before { content: "车间"; }
.mobile-preview .production-table td:nth-child(7)::before { content: "生产数"; }
.mobile-preview .production-table td:nth-child(8)::before { content: "已报"; }
.mobile-preview .production-table td:nth-child(9)::before { content: "未报"; }
.mobile-preview .production-table td:nth-child(10)::before { content: "状态"; }
.mobile-preview .production-table td:nth-child(11)::before { content: "二维码"; }
.mobile-preview .production-table td:nth-child(12)::before { content: "本次数"; }
.mobile-preview .production-table td:nth-child(13)::before { content: "操作"; }

.mobile-preview .production-order-table {
  display: table;
  width: 100% !important;
  min-width: 0 !important;
  table-layout: auto;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: 0 !important;
}

.mobile-preview .production-order-table thead {
  display: table-header-group;
}

.mobile-preview .production-order-table tbody {
  display: table-row-group;
}

.mobile-preview .production-order-table tr {
  display: table-row;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mobile-preview .production-order-table th,
.mobile-preview .production-order-table td {
  display: table-cell;
  height: 24px;
  padding: 2px 3px;
  border: 1px solid #a9a9a9 !important;
  font-size: 11px;
  line-height: 1.1;
  white-space: normal;
  background-clip: border-box !important;
  box-shadow: none !important;
  outline: 0 !important;
}

.mobile-preview .production-order-table tbody tr:first-child td,
.mobile-preview .production-order-table tbody tr:nth-child(even) td {
  border-color: #a9a9a9 !important;
}

.mobile-preview .production-order-table th *,
.mobile-preview .production-order-table td * {
  box-shadow: none !important;
  outline: 0 !important;
}

.mobile-preview .production-order-table th {
  height: 32px;
  line-height: 1.08;
  vertical-align: middle;
}

.mobile-preview .production-order-table th:nth-child(1),
.mobile-preview .production-order-table td:nth-child(1) {
  width: 58px;
  white-space: nowrap;
}

.mobile-preview .production-order-table th:nth-child(2),
.mobile-preview .production-order-table td:nth-child(2) {
  width: 42px;
  white-space: nowrap;
}

.mobile-preview .production-order-table th:nth-child(3),
.mobile-preview .production-order-table td:nth-child(3) {
  width: auto;
  word-break: break-all;
}

.mobile-preview .production-order-table th:nth-child(1),
.mobile-preview .production-order-table th:nth-child(2),
.mobile-preview .production-order-table th:nth-child(4) {
  white-space: normal;
  word-break: keep-all;
}

.mobile-preview .production-order-table th:nth-child(4),
.mobile-preview .production-order-table td:nth-child(4) {
  width: 48px;
  text-align: center;
}

.mobile-preview .production-order-select-btn {
  min-height: 22px;
  padding: 0 4px;
  font-size: 10px;
  border-radius: 4px;
}

.mobile-preview .production-order-table td::before {
  content: none !important;
}

.mobile-preview .production-order-table .secondary {
  min-height: 22px;
  padding: 0 5px;
  font-size: 11px;
}

.mobile-preview .production-submission-table {
  display: table;
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: 0 !important;
}

.mobile-preview .production-submission-shell {
  width: auto;
  max-width: none;
  margin: 12px 8px 0;
  border-radius: 8px;
  overflow: hidden;
}

.mobile-preview .production-submission-shell .production-ui-title {
  padding: 8px 10px;
  border-bottom-width: 3px;
}

.mobile-preview .production-submission-shell .production-ui-title strong {
  font-size: 15px;
  line-height: 1.15;
}

.mobile-preview .production-submission-shell .production-ui-title span {
  font-size: 12px;
}

.mobile-preview .production-submission-shell .production-ui-table-wrap {
  width: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}

.mobile-preview .production-submission-table thead {
  display: table-header-group;
}

.mobile-preview .production-submission-table tbody {
  display: table-row-group;
}

.mobile-preview .production-submission-table tr {
  display: table-row;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mobile-preview .production-submission-table th,
.mobile-preview .production-submission-table td {
  display: table-cell;
  height: 38px;
  padding: 2px 4px;
  border: 1px solid #a9a9a9 !important;
  font-size: 10px;
  line-height: 1.12;
  white-space: nowrap;
  vertical-align: middle;
  background-clip: border-box !important;
  box-shadow: none !important;
  outline: 0 !important;
}

.mobile-preview .production-submission-table th {
  height: 30px;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
}

.mobile-preview .production-submission-table th:nth-child(1),
.mobile-preview .production-submission-table td:nth-child(1) {
  width: 56px;
}

.mobile-preview .production-submission-table th:nth-child(2),
.mobile-preview .production-submission-table td:nth-child(2) {
  width: auto;
  white-space: normal;
  word-break: break-all;
  text-align: left;
}

.mobile-preview .production-submission-table th:nth-child(2) {
  text-align: center;
}

.mobile-preview .production-submission-table td:nth-child(2) {
  display: table-cell;
  max-height: 34px;
  overflow: hidden;
}

.mobile-preview .production-submission-table th:nth-child(3),
.mobile-preview .production-submission-table td:nth-child(3) {
  width: 42px;
  text-align: center;
  vertical-align: middle;
}

.mobile-preview .production-submission-table tbody td:nth-child(3) {
  line-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.mobile-preview .production-submission-table th:nth-child(4),
.mobile-preview .production-submission-table td:nth-child(4) {
  width: 44px;
  text-align: center;
}

.mobile-preview .production-submission-table th:nth-child(5),
.mobile-preview .production-submission-table td:nth-child(5) {
  width: 40px;
  text-align: center;
}

.mobile-preview .production-cancel-btn {
  min-height: 22px;
  padding: 0 3px;
  border-radius: 4px;
  font-size: 10px;
}

.mobile-preview .production-cancel-confirm-mask {
  align-items: start;
  padding-top: 120px;
  background: rgba(15, 23, 42, 0.16);
}

.mobile-preview .production-cancel-confirm {
  width: min(300px, calc(100vw - 32px));
  padding: 14px;
}

.mobile-preview .production-cancel-confirm strong {
  font-size: 17px;
  text-align: center;
}

.mobile-preview .production-cancel-confirm p {
  margin: 8px 0 12px;
  font-size: 12px;
  text-align: center;
}

.mobile-preview .production-cancel-confirm button {
  min-height: 36px;
  font-size: 13px;
}

.mobile-preview .production-report-qty {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d6e2f2;
  border-radius: 6px;
  padding: 6px 8px;
}

.mobile-preview .production-table .secondary {
  width: 100%;
  min-height: 38px;
}

.mobile-preview .production-mobile-list {
  display: grid;
  gap: 8px;
}

.mobile-preview .production-mobile-list .production-ui-title {
  padding: 4px 2px 6px;
  border: 0;
  background: transparent;
}

.mobile-preview .production-mobile-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mobile-preview .production-mobile-product {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  border-bottom: 1px solid #dbe4f0;
}

.mobile-preview .production-mobile-product b,
.mobile-preview .production-mobile-product span {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  color: #111827;
  font-size: 13px;
  line-height: 1.2;
}

.mobile-preview .production-mobile-product b {
  justify-content: center;
  border-right: 1px solid #dbe4f0;
  background: #f8fafc;
  font-weight: 900;
}

.mobile-preview .production-mobile-product span {
  display: -webkit-box;
  font-weight: 900;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mobile-preview .production-mobile-grid {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px minmax(0, 1fr);
}

.mobile-preview .production-mobile-grid b,
.mobile-preview .production-mobile-grid span {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 5px 7px;
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
  background: #fff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-preview .production-mobile-grid b {
  justify-content: center;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.mobile-preview .production-mobile-grid span:nth-child(4n) {
  border-right: 0;
}

.mobile-preview .production-mobile-bottom {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px minmax(96px, 1fr);
  grid-template-rows: 34px 48px;
  min-height: 82px;
  border-bottom: 1px solid #dbe4f0;
}

.mobile-preview .production-mobile-bottom > b,
.mobile-preview .production-mobile-action-label,
.mobile-preview .production-mobile-bottom .production-report-qty,
.mobile-preview .production-mobile-submit {
  min-width: 0;
}

.mobile-preview .production-mobile-bottom > b,
.mobile-preview .production-mobile-action-label {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
}

.mobile-preview .production-mobile-bottom > b {
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.mobile-preview .production-mobile-action-label {
  display: none;
}

.mobile-preview .production-mobile-qr-label {
  grid-column: 3;
  grid-row: 1 / 3;
  border-left: 1px solid #dbe4f0;
  border-bottom: 0 !important;
}

.mobile-preview .production-mobile-qr {
  grid-column: 4;
  grid-row: 1 / 3;
  display: grid;
  justify-content: center;
  align-content: center;
  min-height: 104px !important;
  border: 0;
  background: #fff;
}

.mobile-preview .production-mobile-qr img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.mobile-preview .production-mobile-bottom .production-report-qty {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 5px 8px;
  border-top: 0;
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
  border-left: 0;
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  font-weight: 900;
  text-align: right;
}

.mobile-preview .production-mobile-submit {
  grid-column: 1 / 3;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: auto;
  min-width: 118px;
  height: 32px;
  min-height: 32px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.mobile-preview .answer-product-progress-list {
  gap: 6px;
}

.mobile-preview .answer-product-progress {
  border-radius: 6px;
}

.mobile-preview .answer-product-progress-title {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border-left-width: 3px;
}

.mobile-preview .answer-product-progress-title span:first-child {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.mobile-preview .answer-product-progress-title span:nth-child(2) {
  display: none;
}

.mobile-preview .answer-product-progress-title::after {
  padding: 3px 6px;
  font-size: 11px;
}

.mobile-preview .answer-stage-progress-card {
  border-left-width: 3px;
  border-radius: 6px;
}

.mobile-preview .answer-stage-progress-card .stage-progress-item,
.mobile-preview .stage-progress-item {
  grid-template-columns: minmax(72px, 0.75fr) minmax(0, 1.35fr) minmax(62px, auto);
  gap: 5px;
  min-height: 38px;
  padding: 5px 8px;
}

.mobile-preview .answer-stage-progress-card .stage-progress-name,
.mobile-preview .stage-progress-name {
  min-width: 0;
  font-size: 13px;
  line-height: 1.12;
  white-space: normal;
}

.mobile-preview .stage-progress-name small {
  margin-top: 2px;
  padding: 1px 5px;
  font-size: 10px;
}

.mobile-preview .stage-progress-main {
  gap: 2px;
}

.mobile-preview .answer-stage-progress-card .stage-progress-track,
.mobile-preview .stage-progress-track {
  height: 7px;
}

.mobile-preview .answer-stage-progress-card .stage-progress-note,
.mobile-preview .stage-progress-note {
  font-size: 11px;
  line-height: 1.15;
}

.mobile-preview .answer-stage-progress-card .stage-progress-side,
.mobile-preview .stage-progress-side {
  grid-column: auto;
  grid-template-columns: 1fr;
  gap: 1px;
  justify-items: end;
  min-width: 0;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
}

.mobile-preview .stage-progress-side span:nth-child(2),
.mobile-preview .stage-progress-side span:nth-child(4) {
  display: none;
}

.mobile-preview .stage-progress-percent {
  font-size: 15px;
  line-height: 1;
}

.mobile-preview .stage-progress-detail-sections {
  gap: 5px;
  padding-top: 5px;
}

.mobile-preview .stage-progress-detail-sections .answer-product-detail-title {
  min-height: 34px;
  padding: 7px 9px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c5d5ea;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 68px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.45;
  font-size: 15px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(29, 102, 229, 0.16);
  border-color: var(--accent);
}

.primary,
.secondary {
  min-height: 44px;
  padding: 0 18px;
  font-weight: 900;
  white-space: nowrap;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  box-shadow: 0 12px 26px rgba(29, 102, 229, 0.26);
}

.primary:hover {
  background: linear-gradient(135deg, var(--accent-strong), #0284c7);
  transform: translateY(-1px);
}

.secondary {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.secondary:hover {
  background: #d9e9ff;
}

.secondary.danger {
  color: #b42318;
  background: #fff0f0;
}

.secondary.danger:hover {
  background: #fee2e2;
}

.panel {
  display: none;
  padding: clamp(16px, 2.4vw, 24px);
}

.active-panel {
  display: block;
}

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

.status-pill {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 8px 13px;
  border-radius: 999px;
  text-align: center;
  color: #8a5c13;
  background: #fff5df;
  font-size: 13px;
  font-weight: 900;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 18px;
}

.insight-strip > div {
  padding: 14px;
  border: 1px solid #dce6ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.insight-strip span {
  display: block;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.insight-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
}

.query-pane {
  max-width: 100%;
}

.inbox-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #c8d9ee;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.98));
  box-shadow: var(--small-shadow);
}

.inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inbox-head h2 {
  font-size: 22px;
  line-height: 1.2;
}

.inbox-summary {
  color: #47627f;
  font-weight: 700;
}

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

.inbox-empty {
  padding: 11px 12px;
  border: 1px solid #e0e8f0;
  border-radius: 8px;
  background: #f8fbfc;
}

.inbox-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.inbox-table-wrap {
  max-height: 238px;
  overflow: auto;
  border: 1px solid #c8d9ee;
  border-radius: 8px;
  background: #fff;
}

.inbox-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 13px;
}

.inbox-table th,
.inbox-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e5eef9;
  text-align: left;
  white-space: nowrap;
}

.inbox-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #17345c;
  background: linear-gradient(180deg, #eef6ff, #dcecff);
  font-weight: 900;
}

.inbox-table td:nth-child(4) {
  min-width: 360px;
  white-space: normal;
}

.inbox-table tbody tr:hover {
  background: #edf6ff;
}

.quick-query-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quick-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--small-shadow);
}

.quick-card > strong {
  min-width: 92px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.quick-card .primary {
  min-width: 104px;
  height: 44px;
  white-space: nowrap;
}

.quick-card label {
  gap: 5px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.prompt-chips button {
  min-height: 36px;
  padding: 0 13px;
  color: #2d4559;
  background: #ffffff;
  border: 1px solid #d9e4ee;
  font-size: 13px;
  font-weight: 800;
}

.prompt-chips button:hover {
  color: var(--accent-strong);
  border-color: #8bbcff;
  background: #f2f7ff;
}

.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.question-input-wrap {
  position: relative;
}

.question-input-wrap textarea {
  padding-right: 110px;
}

.question-help-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #b9d2f6;
  border-radius: 8px;
  color: #1559c8;
  background: linear-gradient(180deg, #f7fbff, #e8f2ff);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(29, 102, 229, 0.12);
}

.question-help-trigger:hover {
  color: #0e4fb9;
  background: #dcecff;
}

.ask-form .primary {
  height: 62px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 20, 42, 0.36);
  backdrop-filter: blur(3px);
}

.modal-overlay[hidden] {
  display: none;
}

.question-help-modal {
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #b8d0ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 28px 80px rgba(10, 35, 75, 0.32);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #d6e4f5;
}

.modal-head h2 {
  font-size: 24px;
  line-height: 1.2;
}

.modal-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #35506d;
  background: #eaf2ff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-icon-btn:hover {
  color: #0e4fb9;
  background: #d9e9ff;
}

.modal-help-body {
  max-height: none;
  padding: 16px 22px;
  color: #405c78;
  overflow: auto;
  font-size: 13px;
}

.modal-help-body p {
  color: #405c78;
}

.modal-help-body h4 {
  margin: 12px 0 7px;
  color: #17345c;
  font-size: 14px;
  font-weight: 900;
}

.modal-help-body ul {
  columns: 2;
  column-gap: 32px;
  margin: 0 0 12px;
  padding-left: 18px;
}

.modal-help-body li {
  break-inside: avoid;
  margin: 5px 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #d6e4f5;
  background: #f8fbff;
}

.modal-back-btn {
  display: none;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(8, 20, 42, 0.18);
  backdrop-filter: blur(2px);
}

.busy-overlay[hidden] {
  display: none;
}

.busy-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  padding: 18px 22px;
  border: 1px solid rgba(88, 157, 255, 0.45);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(248, 252, 255, 0.96), rgba(230, 242, 255, 0.96));
  box-shadow: 0 22px 60px rgba(18, 53, 110, 0.28);
  color: #13223a;
  font-weight: 900;
}

.busy-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(68, 127, 219, 0.2);
  border-top-color: #2f7fea;
  border-right-color: #4fc3ff;
  border-radius: 999px;
  animation: busy-spin 0.8s linear infinite;
}

.busy-text {
  line-height: 1.4;
}

body.is-busy button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

@keyframes busy-spin {
  to {
    transform: rotate(360deg);
  }
}

.summary {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.summary-line,
.answer-line {
  padding: 11px 13px;
  border-radius: 8px;
  line-height: 1.6;
  box-shadow: var(--small-shadow);
}

.summary-line {
  border-left: 4px solid var(--accent);
  background: #eef5ff;
}

.answer-title {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 900;
}

.answer-line {
  border-left: 4px solid var(--blue);
  background: #eef5ff;
}

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

.answer-progress-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #c9dcf7;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f7fbff;
  box-shadow: var(--small-shadow);
}

.answer-progress-card.complete {
  border-color: #9bd8bf;
  border-left-color: #059669;
  background: #f4fffb;
}

.answer-progress-head,
.answer-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.answer-progress-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.answer-progress-head span {
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.answer-progress-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe8fb;
}

.answer-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.42);
}

.answer-progress-card.complete .answer-progress-fill {
  background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}

.answer-progress-card.empty .answer-progress-fill {
  background: #94a3b8;
  box-shadow: none;
}

.answer-progress-meta {
  color: #52637b;
  font-size: 13px;
  line-height: 1.45;
}

.answer-progress-meta span:last-child {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-stage-progress-card {
  overflow: hidden;
  border: 1px solid #c9dcf7;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  box-shadow: var(--small-shadow);
}

.answer-stage-progress-card .stage-progress-list {
  padding: 0;
}

.answer-stage-progress-card .stage-progress-item {
  grid-template-columns: 160px minmax(300px, 1fr) 340px;
  gap: 12px;
  min-height: 46px;
  padding: 7px 14px;
}

.answer-stage-progress-card .stage-progress-item:first-child {
  border-top: 0;
}

.answer-stage-progress-card .stage-progress-name {
  font-size: 15px;
}

.answer-stage-progress-card .stage-progress-track {
  height: 8px;
}

.answer-stage-progress-card .stage-progress-note {
  font-size: 12px;
}

.answer-stage-progress-card .stage-progress-side {
  grid-template-columns: 64px 54px 1fr 72px;
  gap: 7px;
  font-size: 12px;
}

.stage-progress-detail-sections {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.stage-progress-detail-sections .answer-product-detail-section {
  border-color: #d5e3f6;
  box-shadow: none;
}

.stage-progress-detail-sections .erp-grid-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.answer-product-progress-list {
  display: grid;
  gap: 10px;
}

.answer-product-progress {
  overflow: hidden;
  border: 1px solid #c9dcf7;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: var(--small-shadow);
}

.answer-product-progress-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 9px 14px;
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(90deg, #f4f8ff 0%, #fbfdff 100%);
  border-left: 4px solid var(--blue);
  list-style: none;
}

.answer-product-progress-title::-webkit-details-marker {
  display: none;
}

.answer-product-progress-title::after {
  content: "展开";
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 800;
}

.answer-product-progress[open] .answer-product-progress-title::after {
  content: "收起";
}

.answer-product-progress-title span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
}

.answer-product-progress-title span:nth-child(2) {
  color: #52637b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.answer-product-progress > .answer-stage-progress-card {
  border: 0;
  border-top: 1px solid #dce8f8;
  border-radius: 0;
  box-shadow: none;
}

.answer-product-detail-sections {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
  background: #fbfdff;
}

.answer-product-detail-section {
  overflow: hidden;
  border: 1px solid #d5e3f6;
  border-radius: 8px;
  background: #fff;
}

.answer-product-detail-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #102033;
  background: #f4f8ff;
  border-bottom: 1px solid #d5e3f6;
  font-size: 14px;
  font-weight: 900;
}

.answer-product-detail-title span:last-child {
  color: #607189;
  font-size: 12px;
  white-space: nowrap;
}

.answer-product-detail-section .erp-grid-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.confirmation {
  margin-bottom: 16px;
}

.confirm-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid #e8c989;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: var(--small-shadow);
}

.confirm-card > strong {
  font-size: 18px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.document-choice-list,
.entity-choice-list {
  display: grid;
  gap: 8px;
}

.choice-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.document-option,
.entity-option,
.module-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.document-option,
.entity-option {
  border-color: #ead9b9;
  background: #fffdf8;
}

.module-option:has(input:checked),
.document-option:has(input:checked),
.entity-option:has(input:checked) {
  border-color: #87c8be;
  background: #f2fbf8;
  box-shadow: inset 3px 0 0 var(--accent);
}

.document-option input,
.entity-option input,
.module-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.document-option span,
.entity-option span,
.module-option span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.document-option strong,
.entity-option strong,
.module-option strong {
  overflow-wrap: anywhere;
}

.document-option em,
.entity-option em,
.module-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(5px);
}

.app-confirm-card {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid #d6e2f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.app-confirm-card strong {
  display: block;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.app-confirm-card p {
  margin: 12px 0 18px;
  color: #475569;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.app-confirm-card div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10001;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.18);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.compact-primary {
  min-height: 42px;
}

.results {
  display: grid;
  gap: 16px;
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--small-shadow);
}

.table-title {
  min-height: 50px;
  padding: 13px 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #f8fbfd;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.table-title span {
  overflow-wrap: anywhere;
}

.table-title span:last-child {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.table-title span:nth-of-type(2) {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.table-export-btn {
  margin-left: auto;
  border: 1px solid #bfd3ff;
  border-radius: 8px;
  background: #edf4ff;
  color: #2451c9;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.table-export-btn:hover {
  background: #dceaff;
  border-color: #8eb2ff;
}

.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 560px;
  max-width: 100%;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  width: max-content;
  min-width: 100%;
}

.erp-expand-btn {
  border: 1px solid #b8cffc;
  border-radius: 6px;
  background: #edf4ff;
  color: #2451c9;
  padding: 5px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.payable-compact-grid th,
.payable-compact-grid td {
  padding: 5px 7px;
  font-size: 12px;
  line-height: 1.25;
}

.payable-compact-grid .erp-expand-btn {
  padding: 4px 7px;
  font-size: 11px;
}

.erp-expand-btn:hover,
.erp-expand-btn.is-open {
  background: #dceaff;
  border-color: #8eb2ff;
}

.payable-main-row td {
  background: #fff;
}

.payable-detail-row > td {
  padding: 0;
  background: #f6f9fc;
  max-width: 0;
}

.payable-detail-wrap {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  width: calc(100vw - 72px);
  max-width: calc(100vw - 72px);
  min-width: 0;
  overflow: hidden;
}

.payable-detail-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.payable-detail-scroll {
  max-height: 320px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.payable-detail-scroll table {
  width: max-content;
  min-width: 960px;
}

.payable-detail-table th,
.payable-detail-table td {
  font-size: 12px;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 280px;
  padding: 18px 18px 14px;
  overflow-x: auto;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.bar-chart-item {
  display: grid;
  grid-template-rows: 28px 190px 22px;
  align-items: end;
  justify-items: center;
  min-width: 76px;
  color: var(--ink);
}

.bar-chart-value {
  align-self: center;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.bar-chart-track {
  position: relative;
  display: flex;
  align-items: end;
  width: 38px;
  height: 190px;
  overflow: hidden;
  border-radius: 10px 10px 4px 4px;
  background: #dbe7fb;
}

.bar-chart-track span {
  display: block;
  width: 100%;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #2563eb 0%, #6ec8f8 100%);
}

.bar-chart-label {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-scroll::after {
  content: "可左右滑动查看完整表格";
  position: sticky;
  left: 0;
  display: block;
  padding: 6px 10px;
  color: var(--muted);
  background: #f8fbfd;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.table-note {
  padding: 10px 15px;
  color: #6d4c13;
  background: #fff7e5;
  border-bottom: 1px solid #f0dfba;
  font-size: 12px;
  line-height: 1.5;
}

.bom-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-arrival-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.bom-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.bom-summary {
  min-height: 70px;
  display: grid;
  grid-template-columns: 36px minmax(220px, 1fr) minmax(260px, auto) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.bom-summary::-webkit-details-marker {
  display: none;
}

.bom-summary::after {
  content: "展开 BOM 明细";
  justify-self: end;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--accent-strong);
  background: #e9f3ff;
  font-size: 12px;
  font-weight: 900;
}

.product-arrival-summary::after {
  content: "展开该产品明细";
}

.bom-item[open] .bom-summary {
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
}

.bom-item[open] .bom-summary::after {
  content: "收起明细";
}

.product-arrival-body .erp-bom-grid {
  border-top: 0;
}

.order-material-order {
  overflow: visible;
}

.order-material-order-title {
  cursor: pointer;
  list-style: none;
}

.order-material-order-title::-webkit-details-marker {
  display: none;
}

.order-material-order-title::after {
  content: "展开";
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.order-material-order[open] .order-material-order-title::after {
  content: "收起";
}

.order-material-order-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f6f9fc;
  min-width: 0;
}

.order-material-section {
  border: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}

.order-material-section-title {
  min-height: 38px;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  background: #f8fbfd;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
}

.order-material-section-title span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.bom-index {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  font-size: 13px;
  font-weight: 900;
}

.bom-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.bom-main strong,
.bom-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bom-main strong {
  color: var(--ink);
  font-size: 16px;
}

.bom-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.bom-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.bom-meta b {
  color: var(--muted);
  font-weight: 800;
}

.bom-spec {
  padding: 10px 16px;
  color: var(--muted);
  border-bottom: 1px solid #edf2f6;
  font-size: 13px;
  line-height: 1.5;
}

.bom-material-scroll {
  max-height: 560px;
}

.bom-material-scroll table {
  min-width: 1900px;
}

.erp-bom-grid {
  border-top: 3px solid #8d8d8d;
  background: #fff;
}

.erp-bom-grid table {
  border-collapse: collapse;
  color: #111;
  font-family: "SimSun", "NSimSun", "Microsoft YaHei", Arial, sans-serif;
}

.erp-bom-grid th,
.erp-bom-grid td {
  height: 26px;
  padding: 2px 5px;
  border: 1px solid #a9a9a9;
  color: #111;
  background-clip: padding-box;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

.erp-bom-grid th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #111;
  background: #f2f1ee;
  font-weight: 400;
  text-align: center;
}

.erp-bom-grid tbody tr:nth-child(even) td {
  background-color: #fff7e8;
}

.erp-bom-grid tbody tr:nth-child(odd) td {
  background-color: #fff;
}

.erp-bom-grid tbody tr.bom-level-1 td {
  background-color: #f7fbff;
}

.erp-bom-grid tbody tr.bom-level-2 td {
  background-color: #fff6df;
}

.erp-bom-grid tbody tr.bom-level-3 td {
  background-color: #f3fbea;
}

.erp-bom-grid tbody tr.bom-level-4 td {
  background-color: #eef7ff;
}

.erp-bom-grid tbody tr.bom-level-5 td {
  background-color: #f7f1ff;
}

.erp-bom-grid tbody tr.bom-level-6 td {
  background-color: #fff1f2;
}

.erp-bom-grid tbody tr:hover td {
  background-color: #d9ecff;
}

.erp-bom-grid tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  border: 1px solid #8f8f8f;
  background: #e8eef7;
  font-weight: 700;
}

.erp-bom-grid .narrow {
  text-align: right;
}

.erp-bom-grid .name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-bom-grid .spec,
.erp-bom-grid .customer,
.erp-bom-grid .remark {
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-bom-grid .bom-rev {
  color: #0000ee;
}

.erp-bom-grid .check {
  text-align: center;
}

.erp-bom-grid .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.erp-result-grid {
  max-height: 620px;
}

.erp-result-grid table {
  table-layout: fixed;
}

.erp-result-grid th,
.erp-result-grid td {
  height: 23px;
  padding: 1px 4px;
  font-size: 12px;
  line-height: 16px;
}

.erp-result-grid td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.return-rebate-compact-grid .primary-name-cell {
  max-width: 340px;
}

.return-rebate-compact-grid .wide-text-cell {
  max-width: 170px;
}

.erp-check {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid #8b8b8b;
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
}

.erp-check.checked::after {
  content: "";
  width: 8px;
  height: 4px;
  display: block;
  margin: 3px 0 0 3px;
  border-left: 2px solid #126cc8;
  border-bottom: 2px solid #126cc8;
  transform: rotate(-45deg);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f6;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475569;
  background: #fbfdff;
  font-weight: 900;
}

tbody tr:hover {
  background: #f7fbfa;
}

.qr-cell {
  text-align: center;
  background: #fff;
}

.qr-image {
  width: 96px;
  height: 96px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  image-rendering: pixelated;
}

.empty {
  padding: 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

.security-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: var(--small-shadow);
}

.security-grid h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.security-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 14px;
  color: #fff;
  background: #1f2937;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}

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

.scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.scanner-overlay[hidden] {
  display: none;
}

.scanner-card {
  width: min(390px, 100%);
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  color: #12213a;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.scanner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scanner-head strong {
  font-size: 18px;
}

.scanner-head .secondary {
  min-height: 34px;
  padding: 0 12px;
}

.scanner-view {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #0f172a;
}

.scanner-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-view span {
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.25);
}

.scanner-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.stage-progress-list {
  display: grid;
  gap: 0;
  padding: 10px 14px 14px;
}

.stage-progress-item {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr) 330px;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid #dce8f8;
  background: #fbfdff;
}

.stage-progress-item.complete {
  background: #f5fffb;
}

.stage-progress-item.empty {
  background: #f8fbff;
}

.stage-progress-item:first-child {
  border-top: 1px solid #dce8f8;
}

.stage-progress-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stage-progress-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.stage-progress-name small {
  display: inline-block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2454c6;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.stage-progress-percent {
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.stage-progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe8fb;
}

.stage-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.48);
}

.stage-progress-item.complete .stage-progress-fill {
  background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}

.stage-progress-item.empty .stage-progress-fill {
  background: #94a3b8;
  box-shadow: none;
}

.stage-progress-side {
  display: grid;
  grid-template-columns: 70px 58px 1fr 84px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.stage-progress-note {
  color: #52637b;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
  }

  .session-card {
    margin-top: 0;
  }

  .login-band,
  .security-grid {
    grid-template-columns: 1fr;
  }

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

  .quick-query-grid {
    grid-template-columns: 1fr;
  }

  .bom-summary {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .bom-summary::after,
  .bom-meta {
    grid-column: 2;
    justify-self: start;
  }

  .stage-progress-item {
    grid-template-columns: 130px minmax(180px, 1fr);
  }

  .answer-stage-progress-card .stage-progress-item {
    grid-template-columns: 150px minmax(240px, 1fr);
  }

  .stage-progress-side {
    grid-column: 2;
    grid-template-columns: 70px 58px 1fr 84px;
  }

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

  .permission-toolbar-main {
    grid-template-columns: 126px minmax(146px, 1fr) minmax(168px, 1.05fr) 130px 112px 82px 124px;
  }

  #inventoryScanForm {
    position: static;
  }

  .answer-stage-progress-card .stage-progress-side {
    grid-column: 2;
    grid-template-columns: 78px 64px 1fr 88px;
  }

  .answer-product-progress-title {
    grid-template-columns: minmax(0, 1fr);
  }

  .answer-product-progress-title::after {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .content,
  .sidebar {
    padding: 16px;
  }

  .panel-head,
  .ask-form,
  .login-form,
  .permission-form,
  .insight-strip,
  .quick-query-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .permission-hero {
    align-items: stretch;
  }

  .permission-hero h2 {
    font-size: 24px;
  }

  .permission-toolbar-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

  .permission-key-field,
  .permission-more-fields,
  .permission-save-button {
    grid-column: 1 / -1;
  }

  .permission-checkbox-group {
    flex-wrap: nowrap;
  }

  .practice-database-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-database-copy {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .practice-database-copy span {
    white-space: normal;
  }

  .permission-record-card .table-title {
    padding: 0 14px;
  }

  .quick-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .quick-card > strong {
    min-width: 0;
  }

  .ask-form .primary {
    height: 48px;
  }

  .modal-help-body ul {
    columns: 1;
  }

  .status-pill {
    justify-self: start;
  }

  .panel {
    padding: 14px;
  }

  .inventory-panel {
    min-height: auto;
    padding: 12px;
  }

  .inventory-panel .panel-head {
    padding: 14px;
    gap: 12px;
  }

  .inventory-panel .panel-head h2 {
    font-size: 38px;
  }

  .inventory-panel .panel-head .secondary {
    width: 100%;
  }

  .inventory-test-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .inventory-card {
    padding: 14px;
  }

  #inventoryScanForm input {
    height: 52px;
    font-size: 20px;
  }

  #inventoryScanForm .primary,
  .inventory-save-form .primary {
    min-height: 52px;
  }

  .inventory-stock-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .inventory-stock-row > strong {
    grid-column: 2;
    justify-self: start;
  }

  .inventory-table-title {
    padding: 10px 12px;
  }

  .inventory-table-title strong {
    font-size: 18px;
  }

  .inventory-table-title span {
    font-size: 14px;
  }

  .inventory-table {
    min-width: 980px;
    font-size: 13px;
  }

  .inventory-table th,
  .inventory-table td {
    padding: 5px 7px;
  }

  .inventory-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .inbox-head {
    align-items: stretch;
    flex-direction: column;
  }

  .table-scroll {
    max-height: none;
  }

  .stage-progress-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stage-progress-side {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    white-space: normal;
  }

  .answer-stage-progress-card .stage-progress-item {
    grid-template-columns: 1fr;
  }

  .answer-stage-progress-card .stage-progress-side {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    white-space: normal;
  }

  .answer-product-progress-title {
    gap: 8px;
  }

  .answer-product-progress-title span:first-child {
    white-space: normal;
  }
}

/* Final mobile inventory table lock: show NO through quantity variance in the first phone view. */
.mobile-preview .inventory-panel .inventory-table {
  width: 834px !important;
  min-width: 834px !important;
  max-width: 834px !important;
  table-layout: fixed !important;
  font-size: 12px !important;
}

.mobile-preview .inventory-panel .inventory-table th,
.mobile-preview .inventory-panel .inventory-table td {
  padding: 2px 2px !important;
  line-height: 1.12 !important;
}

.mobile-preview .inventory-panel .inventory-table th {
  font-size: 12px !important;
  white-space: normal !important;
  word-break: break-all !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.mobile-preview .inventory-panel .inventory-table col:nth-child(1) { width: 20px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(2) { width: 58px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(3) { width: 118px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(4) { width: 24px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(5) { width: 68px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(6) { width: 68px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(7) { width: 62px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(8) { width: 68px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(9) { width: 68px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(10) { width: 62px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(11) { width: 50px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(12) { width: 84px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(13) { width: 48px !important; }
.mobile-preview .inventory-panel .inventory-table col:nth-child(14) { width: 36px !important; }

.mobile-preview .inventory-panel .inventory-table .inv-name-text {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal !important;
  overflow: hidden !important;
  word-break: break-all !important;
  line-height: 1.08 !important;
}

/* Final panel visibility lock: never let inactive business modules leak into the current page. */
body .panel:not(.active-panel) {
  display: none !important;
}

body .panel.active-panel {
  display: block !important;
}

/* Final mobile state lock: logged-in mobile pages must never show the login shell again. */
body.mobile-preview.mobile-logged-in #loginPanel,
body.mobile-preview.mobile-logged-in .login-band,
body.mobile-preview.mobile-logged-in .mobile-login-extra {
  display: none !important;
}

body.mobile-preview.mobile-home .panel {
  display: none !important;
}

body.mobile-preview.mobile-panel-open .panel.active-panel {
  display: block !important;
}

/* Final PC inventory audit table lock: ERP-like layout without stretching the page. */
body:not(.mobile-preview) .inventory-panel .inventory-records {
  max-width: 100%;
  overflow: hidden;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar {
  max-width: 100%;
  box-sizing: border-box;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-form {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head {
  grid-template-columns:
    minmax(150px, 0.85fr)
    minmax(150px, 0.85fr)
    minmax(140px, 0.75fr)
    minmax(210px, 1fr)
    minmax(140px, 0.75fr)
    minmax(140px, 0.75fr)
    minmax(180px, 1fr) !important;
  padding: 8px 12px !important;
  gap: 6px 8px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head input,
body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot input {
  min-width: 0;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-form .inventory-table-wrap {
  max-width: calc(100% - 24px);
  margin: 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table {
  width: 1180px !important;
  min-width: 1180px !important;
  table-layout: fixed !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-marker { width: 26px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-no { width: 42px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-code { width: 100px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-name { width: 370px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-unit { width: 54px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-location-name { width: 160px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-qty { width: 100px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-diff { width: 108px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-note { width: 120px !important; }

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table th,
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Final query output compact table override. */
.results .table-scroll table,
.production-results .table-scroll table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

.results .erp-bom-grid th,
.results .erp-bom-grid td,
.production-results .erp-bom-grid th,
.production-results .erp-bom-grid td {
  height: 21px;
  max-width: 180px;
  padding: 1px 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 15px;
  white-space: nowrap;
}

.results .erp-bom-grid th,
.production-results .erp-bom-grid th {
  height: 40px;
  max-height: 40px;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 16px;
  vertical-align: middle;
}

.results .erp-bom-grid td,
.production-results .erp-bom-grid td {
  height: 21px;
  white-space: nowrap;
}

.results .erp-bom-grid .num,
.production-results .erp-bom-grid .num {
  max-width: 76px;
}

.results .erp-bom-grid .narrow,
.results .erp-bom-grid .unit,
.results .erp-bom-grid .check,
.production-results .erp-bom-grid .narrow,
.production-results .erp-bom-grid .unit,
.production-results .erp-bom-grid .check {
  max-width: 48px;
}

.results .erp-bom-grid .code,
.production-results .erp-bom-grid .code {
  max-width: 104px;
}

.results .erp-bom-grid .name,
.results .erp-bom-grid .primary-name-cell,
.production-results .erp-bom-grid .name,
.production-results .erp-bom-grid .primary-name-cell {
  max-width: 620px;
}

.results .erp-bom-grid .spec,
.results .erp-bom-grid .remark,
.results .erp-bom-grid .wide-text-cell,
.production-results .erp-bom-grid .spec,
.production-results .erp-bom-grid .remark,
.production-results .erp-bom-grid .wide-text-cell {
  max-width: 260px;
}

.results .table-scroll th,
.results .table-scroll td,
.production-results .table-scroll th,
.production-results .table-scroll td {
  padding: 2px 4px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.results .table-scroll th,
.production-results .table-scroll th {
  height: 40px;
  max-height: 40px;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}

.results .table-head-label,
.production-results .table-head-label {
  display: -webkit-box;
  max-height: 32px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.results .table-scroll td,
.production-results .table-scroll td {
  white-space: nowrap;
}

.results .bom-material-scroll table,
.results .payable-detail-scroll table {
  min-width: 100%;
}

body:not(.mobile-preview) .results .sales-performance-grid table {
  min-width: max-content;
}

body:not(.mobile-preview) .results .sales-performance-grid th,
body:not(.mobile-preview) .results .sales-performance-grid td {
  height: 27px;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.25;
  max-width: none;
}

body:not(.mobile-preview) .results .sales-performance-grid th {
  height: 48px;
  max-height: 48px;
  line-height: 18px;
}

body:not(.mobile-preview) .results .sales-performance-grid .num {
  max-width: none;
}

body:not(.mobile-preview) .results .sales-performance-grid .primary-name-cell,
body:not(.mobile-preview) .results .sales-performance-grid .wide-text-cell {
  max-width: none;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .wide-cell {
  white-space: normal;
  word-break: break-all;
  line-height: 1.18;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot {
  grid-template-columns: 180px 180px 260px 260px !important;
  padding: 8px 90px 10px !important;
  max-width: 100%;
  box-sizing: border-box;
}

body.mobile-preview:not(.mobile-logged-in) .panel,
body.mobile-preview:not(.mobile-logged-in) .mobile-dashboard {
  display: none !important;
}

/* Mobile prompt guide modal: scroll inside the modal and keep actions visible. */
.mobile-preview .modal-overlay {
  align-items: stretch !important;
  justify-items: stretch !important;
  padding: 12px !important;
}

.mobile-preview .question-help-modal {
  width: 100% !important;
  max-height: calc(100vh - 24px) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

.mobile-preview .question-help-modal .modal-head {
  align-items: flex-start;
  padding: 12px 12px 10px;
  gap: 8px;
}

.mobile-preview .question-help-modal .modal-head h2 {
  font-size: 24px;
}

.mobile-preview .question-help-modal .modal-head p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.mobile-preview .modal-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
}

.mobile-preview .modal-help-body {
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 12px 18px 16px;
  font-size: 14px;
}

.mobile-preview .modal-help-body ul {
  columns: 1 !important;
  padding-left: 20px;
}

.mobile-preview .modal-help-body li {
  margin: 8px 0;
  line-height: 1.4;
}

.mobile-preview .modal-actions {
  position: sticky;
  bottom: 0;
  padding: 10px 12px 12px;
}

.mobile-preview .modal-actions .primary {
  width: 100%;
  min-height: 42px;
}

/* Mobile inventory action lock: scan and stock query share one row equally. */
.mobile-preview #inventoryScanForm {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

.mobile-preview #inventoryScanForm label {
  grid-column: 1 / -1 !important;
}

.mobile-preview #inventoryQrScanBtn,
.mobile-preview #inventoryScanForm > .primary {
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* ERP-identical PC inventory count document. PC only. */
body:not(.mobile-preview) .inventory-panel .inventory-records {
  max-width: 100%;
  overflow: hidden;
  font-family: "SimSun", "NSimSun", "Microsoft YaHei", Arial, sans-serif;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar {
  height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #86abe0;
  border-bottom: 0;
  border-radius: 0;
  background: #e4f0ff;
  box-sizing: border-box;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar strong {
  color: #111;
  font-size: 15px;
  font-weight: 700;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar span {
  color: #606b7b;
  font-size: 13px;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar .inventory-record-refresh {
  margin-left: auto;
  min-height: 24px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 13px;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar .inventory-toolbar-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar .inventory-toolbar-actions .inventory-record-refresh {
  margin-left: 0;
}

body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar .inventory-record-recycle,
body:not(.mobile-preview) .inventory-panel .inventory-record-toolbar .inventory-record-restore {
  min-height: 24px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 13px;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions.recycle-note {
  justify-content: flex-start;
  padding: 5px 10px;
  background: #edf5ff;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions.recycle-note span {
  color: #36527a;
  font-size: 13px;
  font-weight: 700;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-form {
  max-width: 100%;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid #78a5de;
  border-radius: 0;
  background: #dcecff;
  box-shadow: none;
  box-sizing: border-box;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-tabs {
  height: 27px;
  padding: 0 8px;
  display: flex;
  align-items: end;
  border-bottom: 1px solid #8fb3e4;
  background: #dcecff;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-tabs span,
body:not(.mobile-preview) .inventory-panel .pc-erp-tabs strong {
  height: 25px;
  min-width: 54px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9ab7df;
  border-bottom: 0;
  border-radius: 0;
  background: #e8f3ff;
  color: #1d4f91;
  font-size: 13px;
  font-weight: 400;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-tabs strong {
  background: #fff;
  color: #000;
  font-weight: 700;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head {
  display: grid;
  grid-template-columns:
    170px 170px 156px 260px 150px 160px minmax(180px, 1fr) !important;
  gap: 7px 10px !important;
  align-items: center;
  padding: 9px 12px !important;
  background: #dcecff;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head label,
body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot label {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head span {
  color: #e00000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head input,
body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot input {
  width: 100%;
  height: 24px;
  min-height: 24px;
  min-width: 0;
  padding: 1px 5px;
  border: 1px solid #b8afa9;
  border-radius: 0;
  background: #eeeeee;
  color: #111;
  box-shadow: none;
  font-size: 13px;
  line-height: 20px;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-form .inventory-table-wrap {
  max-width: calc(100% - 24px);
  margin: 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #9d9d9d;
  border-radius: 0;
  background: #fff;
  box-sizing: border-box;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table {
  width: 1360px !important;
  min-width: 1360px !important;
  table-layout: fixed !important;
  border-collapse: collapse;
  border-spacing: 0;
  font-family: "SimSun", "NSimSun", "Microsoft YaHei", Arial, sans-serif;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-marker { width: 26px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-no { width: 42px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-code { width: 105px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-name { width: 430px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-unit { width: 60px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-location-name { width: 190px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-qty { width: 105px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-diff { width: 115px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-note { width: 277px !important; }

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table th,
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table td {
  height: 24px;
  padding: 1px 4px;
  border: 1px solid #9e9e9e;
  color: #000;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table th {
  background: #eef4fb;
  font-weight: 400;
  text-align: center;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table tbody tr:first-child td {
  background: #d9efc4;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table tbody tr:nth-child(even) td {
  background: #edf0f0;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .row-marker {
  text-align: center;
  color: #000;
  font-size: 15px;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .wide-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .inventory-count-edit,
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .inventory-note-edit {
  width: 100%;
  height: 21px;
  min-height: 21px;
  padding: 1px 4px;
  border: 1px solid #8f8f8f;
  border-radius: 0;
  background: #fffde8;
  color: #111;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .inventory-count-edit {
  text-align: right;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot {
  display: grid;
  grid-template-columns: 190px 190px 260px 260px !important;
  gap: 6px 28px;
  padding: 8px 110px 10px !important;
  background: #dcecff;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot span {
  color: #000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* Final PC compact override: fit ERP inventory count document on normal PC width. */
body:not(.mobile-preview) .inventory-panel .pc-erp-count-form {
  margin-bottom: 8px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head {
  grid-template-columns: 145px 145px 135px 220px 130px 130px minmax(120px, 1fr) !important;
  gap: 5px 8px !important;
  padding: 7px 10px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head span,
body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot span {
  font-size: 12px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-head input,
body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot input {
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 4px !important;
  font-size: 12px !important;
  line-height: 20px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions {
  min-height: 30px;
  padding: 4px 10px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #dcecff;
  border-top: 1px solid #b8cbe5;
  box-sizing: border-box;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7b1f14;
  font-size: 12px;
  font-weight: 700;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions span.ok {
  color: #17643b;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions button {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 2px;
  font-size: 12px;
  white-space: nowrap;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-doc-actions button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-form .inventory-table-wrap {
  max-width: calc(100% - 20px) !important;
  margin: 0 10px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table {
  width: 1000px !important;
  min-width: 1000px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-marker { width: 22px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-no { width: 34px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-code { width: 78px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-name { width: 350px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-unit { width: 34px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-location-name { width: 120px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-qty { width: 72px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-diff { width: 78px !important; }
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table col.pc-col-note { width: 160px !important; }

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table th,
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table td {
  height: 22px !important;
  padding: 1px 3px !important;
  font-size: 12px !important;
  line-height: 16px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .row-marker {
  font-size: 13px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .inventory-count-edit,
body:not(.mobile-preview) .inventory-panel .pc-erp-inventory-table .inventory-note-edit {
  height: 19px !important;
  min-height: 19px !important;
  padding: 0 3px !important;
  font-size: 12px !important;
}

body:not(.mobile-preview) .inventory-panel .pc-erp-count-foot {
  grid-template-columns: 170px 170px 230px 230px !important;
  gap: 5px 18px !important;
  padding: 7px 80px 8px !important;
}

/* Inventory open manager: assistant-side gate for ERP-created count docs. */
.inventory-open-manager {
  border: 1px solid #c7d8f2;
  background: #f8fbff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(20, 52, 100, 0.08);
}

.inventory-panel.inventory-open-mode > .panel-head,
.inventory-panel.inventory-open-mode > .mobile-inventory-title,
.inventory-panel.inventory-open-mode > .inventory-access-notice,
.inventory-panel.inventory-open-mode > .inventory-test-grid,
.inventory-panel.inventory-open-mode > .inventory-records {
  display: none !important;
}

.inventory-panel.inventory-open-mode .inventory-open-manager {
  margin-top: 0;
}

.inventory-open-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.inventory-open-head strong {
  display: block;
  color: #142033;
  font-size: 18px;
  line-height: 1.2;
}

.inventory-open-head span,
.inventory-open-tip {
  color: #66758d;
  font-size: 13px;
  font-weight: 700;
}

.inventory-open-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-open-actions button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
}

.inventory-open-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.inventory-open-row {
  display: grid;
  grid-template-columns: 24px 58px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #d8e3f4;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  color: #142033;
}

.inventory-open-row input {
  width: 18px;
  height: 18px;
}

.inventory-open-row .warehouse-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
}

.inventory-open-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-open-row small {
  grid-column: 3 / 5;
  color: #6a7890;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-open-row em {
  border-radius: 999px;
  padding: 3px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  background: #eef4ff;
  color: #3a61c9;
}

.inventory-open-row.opened em {
  background: #e8f6eb;
  color: #2f7a3b;
}

.inventory-open-row.blocked {
  color: #8792a5;
  background: #f6f8fb;
}

.inventory-open-row.blocked em {
  background: #fbeaea;
  color: #9b2d22;
}

.inventory-open-empty {
  padding: 12px;
  border: 1px dashed #c7d8f2;
  border-radius: 8px;
  color: #66758d;
  font-weight: 800;
}

.mobile-preview .inventory-open-manager {
  margin: 0 0 10px;
  padding: 10px;
}

.mobile-preview .inventory-open-head {
  align-items: flex-start;
}

.mobile-preview .inventory-open-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.mobile-preview .inventory-open-list {
  grid-template-columns: 1fr;
}

/* Compact PC inventory open switch/table. */
body:not(.mobile-preview) .inventory-open-manager {
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 6px;
  border-color: #c8d8ef;
  background: #f7fbff;
  box-shadow: none;
}

body:not(.mobile-preview) .inventory-open-head {
  min-height: 32px;
  margin-bottom: 0;
}

body:not(.mobile-preview) .inventory-open-head strong {
  display: inline-block;
  margin-right: 12px;
  font-size: 15px;
}

body:not(.mobile-preview) .inventory-open-head span {
  font-size: 12px;
  color: #64748b;
}

body:not(.mobile-preview) .inventory-open-actions {
  align-items: center;
}

body:not(.mobile-preview) .inventory-open-actions button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
}

.inventory-open-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd7ea;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.inventory-open-switch input {
  width: 14px;
  height: 14px;
  margin: 0;
}

body:not(.mobile-preview) .inventory-open-body {
  margin-top: 6px;
  border: 1px solid #9aa7b8;
  background: #fff;
  overflow: visible;
  max-height: none;
}

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

.inventory-open-tile {
  display: grid;
  grid-template-columns: 16px 42px minmax(86px, 1fr) 62px 96px;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #d8e3f3;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #111827;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.15;
  box-shadow: 0 3px 10px rgba(30, 58, 138, 0.05);
  cursor: pointer;
}

.inventory-open-tile:hover {
  border-color: #9db8e8;
  background: #ffffff;
}

.inventory-open-tile input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.inventory-open-tile .warehouse-code,
.inventory-open-tile strong,
.inventory-open-tile small,
.inventory-open-tile select {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.inventory-open-tile .warehouse-code {
  font-weight: 900;
  color: #64748b;
}

.inventory-open-tile strong {
  font-weight: 900;
  color: #1e293b;
}

.inventory-open-tile small {
  grid-column: 2 / -1;
  color: #75839a;
  font-size: 11px;
  font-weight: 800;
}

.inventory-open-tile select {
  height: 26px;
  min-width: 0;
  border: 1px solid #cbd7ea;
  border-radius: 5px;
  background: #fff;
  color: #1f2a44;
  font-size: 12px;
  font-weight: 800;
  padding: 0 4px;
}

.inventory-open-tile em {
  display: inline-block;
  min-width: 54px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3158bd;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.inventory-open-tile.opened em {
  background: #e7f7e8;
  color: #2f7a3b;
}

.inventory-open-tile.blocked {
  color: #7b8494;
  background: #fbfcff;
}

.inventory-open-tile.blocked em {
  background: #fff4f2;
  color: #a63a2f;
}

.inventory-open-tile.locked {
  color: #8792a4;
  background: linear-gradient(180deg, #f7f9fd 0%, #f1f5fb 100%);
  cursor: not-allowed;
}

.inventory-open-tile.locked em {
  background: #fff0ec;
  color: #a63a2f;
}

.inventory-open-tile input:disabled {
  cursor: not-allowed;
}

@media (max-width: 1200px) {
  .inventory-open-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .inventory-open-grid {
    grid-template-columns: 1fr;
  }
}

.inventory-open-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: "SimSun", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
}

.inventory-open-table th,
.inventory-open-table td {
  height: 27px;
  padding: 2px 6px;
  border-right: 1px solid #a4a9b0;
  border-bottom: 1px solid #a4a9b0;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-open-table th {
  height: 25px;
  background: #f2f0ea;
  font-weight: 900;
  text-align: center;
}

.inventory-open-table th:nth-child(1),
.inventory-open-table td:nth-child(1) {
  width: 36px;
  text-align: center;
}

.inventory-open-table th:nth-child(2),
.inventory-open-table td:nth-child(2) {
  width: 70px;
}

.inventory-open-table th:nth-child(4),
.inventory-open-table td:nth-child(4) {
  width: 86px;
  text-align: center;
}

.inventory-open-table th:nth-child(5),
.inventory-open-table td:nth-child(5) {
  width: 210px;
}

.inventory-open-table tbody tr:nth-child(odd) td {
  background: #eef8dc;
}

.inventory-open-table tbody tr:nth-child(even) td {
  background: #f7f9f9;
}

.inventory-open-table tr.blocked td {
  color: #7b8494;
}

.inventory-open-table em {
  display: inline-block;
  min-width: 56px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3158bd;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.inventory-open-table tr.opened em {
  background: #e7f7e8;
  color: #2f7a3b;
}

.inventory-open-table tr.blocked em {
  background: #fff1f0;
  color: #a43a2e;
}

.inventory-open-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
}

.inventory-open-table .inventory-open-empty {
  height: 32px;
  text-align: center;
  color: #64748b;
  font-weight: 800;
}

body:not(.mobile-preview) .inventory-open-tip {
  padding: 4px 6px;
  color: #64748b;
  font-size: 12px;
}

/* Mobile login fine-tune: keep original vertical layout, only center the card horizontally. */
.mobile-preview:not(.mobile-logged-in) .login-form {
  width: min(555px, calc((100vw - 96px) * 1.1));
  margin-left: auto;
  margin-right: auto;
}

.mobile-preview:not(.mobile-logged-in) .login-copy {
  width: min(555px, calc((100vw - 96px) * 1.1));
  max-width: calc(100vw - 32px);
}

.mobile-preview:not(.mobile-logged-in) .mobile-company-name {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.mobile-preview:not(.mobile-logged-in) .mobile-login-extra {
  margin-top: 40px;
}

@media (max-height: 760px) {
  .mobile-preview:not(.mobile-logged-in) .mobile-login-extra {
    gap: 10px;
    margin-top: 8px;
  }

  .mobile-preview:not(.mobile-logged-in) .mobile-login-extra i {
    min-height: 72px;
  }
}
