/* China ERP only. Keep shared ERP navigation and raw-once documents isolated. */
.china-erp-surface {
  --china-ink: #172033;
  --china-muted: #536176;
  --china-line: #e2e8f0;
  --china-accent: #4338ca;
  --china-accent-soft: #eef2ff;
  color: var(--china-ink);
}
.china-erp-surface > div { min-width: 0; }
.china-erp-surface .china-page { width: 100%; min-width: 0; max-width: 1440px; margin-inline: auto; }
.china-erp-surface .china-page--form { max-width: 1080px; }
.china-erp-surface .china-page--reading { max-width: 960px; }
.china-erp-surface .china-page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px; padding-block: 4px 8px; }
.china-erp-surface .china-page-heading { min-width: 0; flex: 1 1 320px; }
.china-erp-surface .china-eyebrow { margin: 0 0 8px; color: var(--china-accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.china-erp-surface .china-page-header h1 { margin-bottom: 8px; line-height: 1.35; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.035em; }
.china-erp-surface .china-page-header h1 [lang="zh-CN"] { display: inline-block; font-size: 15px; font-weight: 400; letter-spacing: 0; }
.china-erp-surface .china-page-description { margin: 0; color: var(--china-muted); font-size: 13px; line-height: 1.7; }
.china-erp-surface .china-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
.china-erp-surface :is(.china-btn, .button, .button-gray, .save-cancel-button-save, .save-cancel-button-cancel) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.china-erp-surface :is(.china-btn, .button) { background: #172033; color: #fff; }
.china-erp-surface :is(.china-btn-primary, .button-blue) { background: var(--china-accent) !important; border-color: var(--china-accent); color: #fff !important; }
.china-erp-surface :is(.china-btn-primary, .button-blue):hover { background: #3730a3 !important; border-color: #3730a3; }
.china-erp-surface :is(.china-btn-secondary, .button-gray, .save-cancel-button-cancel) { background: #fff !important; border-color: #cbd5e1 !important; color: #334155 !important; }
.china-erp-surface :is(.china-btn-secondary, .button-gray, .save-cancel-button-cancel):hover { background: #f8fafc !important; border-color: #94a3b8 !important; }
.china-erp-surface .china-btn-danger { background: #fff1f2 !important; border-color: #fecdd3 !important; color: #9f1239 !important; }
.china-erp-surface .china-btn-danger:hover { background: #ffe4e6 !important; }
.china-erp-surface :is(.china-btn, .button, .button-gray, .save-cancel-button-cancel) > svg { width: 16px; height: 16px; flex: none; }
.china-erp-surface :is(.china-btn, .button, .button-gray) [lang="zh-CN"] { font-size: 11px; font-weight: 400; white-space: nowrap; }
.china-erp-surface :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--china-accent); outline-offset: 3px; }
.china-erp-surface :is(button, input, select, textarea):disabled { cursor: not-allowed; opacity: .6; }
.china-erp-surface :is(.card, .china-form-panel) { border-color: var(--china-line); border-radius: 14px; box-shadow: 0 2px 5px rgb(15 23 42 / 3%); }
.china-erp-surface .china-filter-panel { padding: 20px; }
.china-erp-surface .china-filter-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 16px; }
.china-erp-surface .china-filter-field { min-width: 0; }
.china-erp-surface .china-filter-field > label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.china-erp-surface .china-filter-field > label [lang="zh-CN"] { color: var(--china-muted); font-size: 11px; font-weight: 400; }
.china-erp-surface .china-filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.china-erp-surface :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select:not([multiple])) { min-height: 42px; min-width: 0; }
.china-erp-surface :is(input, select, textarea) { transition: border-color .15s, box-shadow .15s; }
.china-erp-surface :is(input[type="checkbox"], input[type="radio"]) { width: 1rem; height: 1rem; padding: 0; flex: none; accent-color: var(--china-accent); }
.china-erp-surface .china-inline-checkbox { display: inline-flex; align-items: center; justify-content: flex-start; gap: 9px; width: fit-content; min-height: 42px; padding: 10px 12px; border: 1px solid var(--china-line); border-radius: 9px; background: #f8fafc; font-size: 13px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.china-erp-surface .china-inline-checkbox [lang="zh-CN"] { font-size: 11px; color: var(--china-muted); white-space: nowrap; }
.china-erp-surface .china-inline-checkbox:has(input:checked) { background: var(--china-accent-soft); border-color: #a5b4fc; color: #3730a3; }
.china-erp-surface .china-search-control { position: relative; }
.china-erp-surface .china-search-control > svg { position: absolute; inset: 13px auto auto 13px; width: 17px; height: 17px; color: #64748b; pointer-events: none; }
.china-erp-surface .china-search-control > input { padding-left: 39px; }
.china-erp-surface :is(.china-section-header, .card-header) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--china-line); }
.china-erp-surface :is(.china-section-header, .card-header) h2 { margin: 0; font-size: 15px; }
.china-erp-surface .china-result-count { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: 12px; }
.china-erp-surface .china-result-count strong { color: var(--china-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.china-erp-surface :is(.china-table, .card table) { width: 100%; font-size: 13px; border-collapse: collapse; }
/* Keep absolutely positioned sr-only labels inside horizontally scrolled tables. */
.china-erp-surface .overflow-x-auto { position: relative; }
.china-erp-surface :is(.china-table, .card table) thead { background: #f8fafc; }
.china-erp-surface :is(.china-table, .card table) th { padding: 13px 20px; color: #475569; font-size: 12px; font-weight: 600; text-align: left; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.china-erp-surface :is(.china-table, .card table) th [lang="zh-CN"] { margin-top: 3px; font-size: 11px; }
.china-erp-surface :is(.china-table, .card table) td { padding: 16px 20px; vertical-align: middle; }
.china-erp-surface :is(.china-table, .card table) tbody tr { border-top: 1px solid #edf1f7; }
.china-erp-surface :is(.china-table, .card table) tbody tr:hover { background: #fafbff; }
.china-erp-surface .badge { gap: 3px; padding: 4px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.china-erp-surface .china-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 52px 24px; text-align: center; }
.china-erp-surface .china-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border: 1px solid #e0e7ff; border-radius: 16px; background: #f5f7ff; color: #6366f1; }
.china-erp-surface .china-empty-icon svg { width: 26px; height: 26px; }
.china-erp-surface .china-empty-state h3 { margin: 0 0 6px; font-size: 15px; }
.china-erp-surface .china-empty-state p { max-width: 480px; color: var(--china-muted); font-size: 13px; line-height: 1.75; }
.china-erp-surface .china-empty-state .china-btn { margin-top: 16px; }
.china-erp-surface .china-form-panel { padding: 24px; background: #fff; }
.china-erp-surface .china-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 20px; margin-top: 8px; border-top: 1px solid var(--china-line); }
.china-erp-surface [data-form-field] { min-width: 0; }
.china-erp-surface [data-form-field] > label { font-size: 13px; line-height: 1.7; }
.china-erp-surface [data-form-field] > label [lang="zh-CN"] { display: inline-block; font-size: 12px; }
.china-erp-surface #china-sample-form [data-formset-row][aria-disabled="true"] { opacity: .62; background: #fef2f2; border-color: #fecaca; }
.china-erp-surface .china-stat-card { position: relative; padding: 22px; border: 1px solid var(--china-line); border-radius: 14px; background: #fff; box-shadow: 0 2px 5px rgb(15 23 42 / 3%); }
.china-erp-surface .china-stat-card::before { content: ""; position: absolute; left: 22px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: #6366f1; }
@media (min-width: 768px) {
  .china-erp-surface .china-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .china-erp-surface .china-filter-grid--factory .china-filter-field:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  .china-erp-surface .china-filter-grid--factory { grid-template-columns: minmax(240px, 1fr) 180px auto auto; }
  .china-erp-surface .china-filter-grid--factory .china-filter-field:first-child { grid-column: auto; }
  .china-erp-surface .china-filter-grid--sample { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .china-erp-surface .china-filter-grid--sample .china-filter-field:first-child { grid-column: span 2; }
  .china-erp-surface .china-filter-grid--sample .china-filter-actions { grid-column: span 2; justify-content: flex-end; }
}
@media (max-width: 767px) {
  .china-erp-surface > div { padding: 20px 16px; }
  .china-erp-surface .china-page-header { gap: 16px; }
  .china-erp-surface .china-page-heading { flex-basis: 100%; }
  .china-erp-surface .china-page-actions { width: 100%; }
  .china-erp-surface .china-page-actions > :is(a, button) { flex: 1 1 auto; }
  .china-erp-surface .china-filter-panel, .china-erp-surface .china-form-panel { padding: 16px; }
  .china-erp-surface .china-filter-actions > :is(a, button) { flex: 1 1 auto; }
  .china-erp-surface .china-section-header { padding: 16px; }
  .china-erp-surface .china-form-actions > :is(a, button) { flex: 1 1 auto; }
  .china-erp-surface .china-empty-state { padding: 40px 18px; }
}
/* The shared mobile menu/notification controls are fixed above the content. */
@media (max-width: 1023px) {
  .china-erp-surface > div { padding-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .china-erp-surface *, .china-erp-surface *::before, .china-erp-surface *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
