:root {
  color-scheme: light;
  --ink: #162033;
  --muted: #667085;
  --line: #e5e7eb;
  --paper: #ffffff;
  --canvas: #f4f6f8;
  --blue: #245eea;
  --blue-dark: #1746ba;
  --blue-soft: #eaf0ff;
  --amber: #a15c00;
  --amber-soft: #fff7df;
  --green: #18794e;
  --green-soft: #e8f7ef;
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

.production-workspace,
.admin-workspace {
  display: grid;
  gap: 18px;
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.production-summary article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 16px;
}

.production-summary span { color: var(--muted); font-size: 12px; }
.production-summary strong { font-size: 25px; }
.compact-heading { align-items: center; margin-bottom: 16px; }

.production-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 10px;
  margin-bottom: 14px;
}

.production-filters input,
.production-filters select,
.admin-table input,
.admin-table select,
.uplift-date-editor textarea {
  width: 100%;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: white;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
}

.production-table-wrap,
.admin-table-wrap { overflow-x: auto; }

.production-table,
.admin-table { width: 100%; border-collapse: collapse; }

.production-table th,
.production-table td,
.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.production-table th,
.admin-table th { background: #f8fafc; color: var(--muted); font-size: 12px; }

.order-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.urgent-dot {
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  border-radius: 5px;
  background: #fff0ed;
  padding: 2px 4px;
  color: #b42318;
  font-size: 10px;
}

.production-status { border-radius: 999px; background: #eef2f7; padding: 5px 8px; font-size: 11px; }
.production-status.completed { background: #e8f7ef; color: #177a4d; }
.production-status.in_progress { background: #edf3ff; color: #1746ba; }
.production-status.pending_print { background: #fff2e2; color: #9a4c00; }

.order-detail-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 48px);
  border: 0;
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0 30px 80px rgba(17, 31, 55, 0.24);
}

.order-detail-dialog::backdrop { background: rgba(17, 31, 55, 0.55); }
.dialog-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 27px; cursor: pointer; }
.detail-task-list { display: grid; gap: 10px; margin-top: 18px; }
.detail-task-list > article { border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.detail-task-list > article > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.detail-task-list dl { display: grid; gap: 6px; margin: 12px 0 0; }
.detail-task-list dl div { display: flex; justify-content: space-between; gap: 12px; }
.detail-task-list dt, .detail-task-list dd { margin: 0; font-size: 12px; }
.detail-task-list dt { color: var(--muted); }
.detail-evidence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.detail-evidence img { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; }

.staff-admin-table {
  min-width: 1080px;
  table-layout: fixed;
}

.staff-admin-table th:nth-child(1),
.staff-admin-table td:nth-child(1) { width: 56px; }
.staff-admin-table th:nth-child(2),
.staff-admin-table td:nth-child(2) { width: 280px; }
.staff-admin-table th:nth-child(3),
.staff-admin-table td:nth-child(3) { width: 190px; }
.staff-admin-table th:nth-child(4),
.staff-admin-table td:nth-child(4) { width: 200px; }
.staff-admin-table th:nth-child(5),
.staff-admin-table td:nth-child(5) { width: 200px; }
.staff-admin-table th:nth-child(6),
.staff-admin-table td:nth-child(6) { width: 90px; }
.staff-admin-table th:nth-child(7),
.staff-admin-table td:nth-child(7) { width: 80px; }

.staff-identity-fields {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.staff-identity-fields input {
  display: block;
  min-width: 0;
}
.store-checks { display: grid; min-width: 160px; gap: 5px; }
.mini-check, .toggle-label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.mini-check input, .toggle-label input { width: auto; }
.table-save { border: 1px solid #b8c7e8; border-radius: 8px; background: var(--blue-soft); padding: 8px 12px; color: var(--blue-dark); cursor: pointer; }
.compact-primary { width: auto; padding: 10px 16px; }
.pricing-admin-grid { display: grid; grid-template-columns: minmax(230px, 0.35fr) minmax(520px, 1fr); gap: 20px; }
.uplift-date-editor { display: grid; align-content: start; gap: 8px; font-weight: 800; }
.uplift-date-editor small { color: var(--muted); font-weight: 400; line-height: 1.5; }

@media (max-width: 900px) {
  .production-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-filters, .pricing-admin-grid { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

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

.hub-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 232px;
  flex-direction: column;
  padding: 26px 18px;
  background: #0e1c35;
  color: white;
}

.hub-brand {
  display: grid;
  gap: 4px;
  padding: 0 10px 24px;
}

.hub-brand span {
  color: #88aaff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.hub-brand strong {
  font-size: 20px;
}

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

.hub-nav a {
  padding: 12px 14px;
  border-radius: 10px;
  color: #aebbd1;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.hub-nav a:hover,
.hub-nav a.active {
  background: #1f3761;
  color: #fff;
}

.hub-sidebar-foot {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aebbd1;
  font-size: 12px;
}

.hub-sidebar-foot small {
  color: #70819e;
}

.hub-content {
  min-height: 100vh;
  margin-left: 232px;
}

.hub-content .topbar {
  position: sticky;
  top: 0;
  z-index: 15;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: #13213c;
  color: white;
}

.topbar h1,
.panel h2,
.confirm-bar h2,
.success h2 {
  margin: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 4px;
  color: #8aa9ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.local-badge {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #dce6ff;
  font-size: 13px;
}

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

.staff-identity {
  color: #dbe7ff;
  font-size: 14px;
}

.header-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
}

.staff-login-panel {
  max-width: 680px;
  margin: 56px auto;
}

.staff-login-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
}

.staff-login-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.staff-login-form input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
}

.staff-login-form .primary {
  min-height: 46px;
}

.test-account-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.worker-entry {
  padding: 9px 13px;
  border-radius: 9px;
  background: white;
  color: #18396f;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.network-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #cbd8f5;
  border-radius: 12px;
  background: #edf3ff;
  color: #314870;
  font-size: 13px;
}

.network-strip strong,
.network-strip span,
.network-strip code {
  margin-right: 7px;
}

.network-strip code {
  color: #1746ba;
  font-weight: 800;
}

.copy-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #9eb3e3;
  border-radius: 8px;
  background: white;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 700;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e9edf2;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.steps li span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #d3dae4;
}

.steps li.active {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.steps li.active span {
  background: var(--blue);
  color: white;
}

.panel,
.confirm-bar,
.success {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(21, 31, 51, 0.05);
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(360px, 1.25fr);
  gap: 36px;
  padding: 28px;
}

.workspace-section {
  margin-bottom: 54px;
  scroll-margin-top: 110px;
}

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

.workspace-heading h2 {
  margin: 2px 0 0;
  font-size: 25px;
}

.network-compact {
  color: var(--muted);
  font-size: 12px;
}

.network-compact code {
  color: var(--blue-dark);
  font-weight: 800;
}

.network-compact .copy-button {
  margin-left: 6px;
  padding: 5px 9px;
}

.compact-upload {
  display: block;
  padding: 18px;
}

.compact-upload #uploadForm {
  display: grid;
  grid-template-columns: 180px minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.store-field {
  display: grid;
  align-content: center;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.store-field select {
  min-height: 44px;
  border: 1px solid #cbd3df;
  border-radius: 9px;
  background: white;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.compact-upload .dropzone {
  min-height: 86px;
  grid-template-columns: auto 1fr;
  place-items: center start;
  align-content: center;
  padding: 14px 18px;
  text-align: left;
}

.compact-upload .drop-icon {
  grid-row: 1 / 3;
}

.secondary-button {
  min-height: 44px;
  align-self: center;
  border: 1px solid #aebbd1;
  border-radius: 9px;
  background: white;
  padding: 10px 14px;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.compact-review {
  margin-top: 14px;
  padding: 18px;
}

.review-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.review-action-row .parsed-document-bar {
  flex: 1;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.review-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.review-actions a,
.step-done {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

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

.review-actions a {
  border: 1px solid #b8c6e6;
  color: var(--blue-dark);
}

.compact-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.summary-card.summary-combined strong {
  font-size: 20px;
}

.summary-card.matched {
  border-color: #b8dfca;
  background: #f4fbf7;
}

.summary-card.warning {
  border-color: #f0c88b;
  background: #fffbf4;
}

.batch-note-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.batch-note-field textarea,
.inline-note-editor textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #cbd3df;
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}

.batch-note-field textarea {
  min-height: 74px;
}

.records-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.records-details summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 2px 10px;
  cursor: pointer;
  color: #344054;
  font-weight: 800;
}

.records-details summary small {
  color: var(--muted);
  font-weight: 500;
}

.records-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 6px 0 10px;
}

.urgent-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.confirm-hint {
  margin-top: 10px;
}

.my-file-list {
  display: grid;
  gap: 14px;
}

.my-file-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 18px;
  box-shadow: 0 6px 24px rgba(21, 31, 51, 0.04);
}

.my-file-card.needs-review {
  border-color: #eaa35b;
  box-shadow: 0 0 0 2px #fff0df inset;
}

.my-file-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.my-file-heading strong,
.my-file-heading span {
  display: block;
}

.my-file-heading div > span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.file-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.info-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 7px;
  background: #eef2f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.info-tag.urgent {
  background: #fff0ed;
  color: #b42318;
}

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

.inline-note-editor {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.inline-note-editor textarea {
  min-height: 66px;
}

.my-file-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.my-file-actions a,
.my-file-actions button {
  border: 1px solid #bdc8da;
  border-radius: 8px;
  background: white;
  padding: 8px 11px;
  color: #344054;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.file-orders {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.file-orders > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-orders > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-chip {
  border: 0;
  border-radius: 999px;
  background: var(--blue-soft);
  padding: 7px 10px;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.order-detail-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  width: min(560px, 92vw);
  overflow-y: auto;
  background: white;
  padding: 24px;
  box-shadow: -18px 0 50px rgba(13, 27, 51, 0.18);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(8, 18, 36, 0.38);
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-heading h2 {
  margin: 0;
}

.drawer-heading button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  cursor: pointer;
  font-size: 24px;
}

.order-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.order-overview-grid span {
  display: grid;
  gap: 5px;
  border-radius: 10px;
  background: #f6f8fb;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

.order-overview-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.drawer-alert {
  border-radius: 9px;
  background: #fff0ed;
  padding: 11px 13px;
  color: #b42318;
  font-weight: 800;
}

.pricing-preview {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
  border-radius: 10px;
  background: #f0f7ff;
  padding: 13px;
  color: #31507f;
}

.drawer-task-list {
  display: grid;
  gap: 12px;
}

.drawer-task {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.drawer-task > div:first-child {
  display: grid;
  gap: 4px;
}

.drawer-task > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.drawer-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.drawer-evidence a {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
}

.drawer-evidence img {
  width: 94px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f7;
}

.muted {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

#uploadForm {
  display: grid;
  gap: 12px;
}

.uploader-field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.uploader-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd3df;
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.uploader-field small {
  color: var(--muted);
  font-weight: 500;
}

.dropzone {
  display: grid;
  min-height: 150px;
  padding: 22px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1.5px dashed #99acd6;
  border-radius: 12px;
  background: #f8faff;
  cursor: pointer;
  text-align: center;
}

.dropzone:hover {
  border-color: var(--blue);
  background: #f1f5ff;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font-size: 21px;
  font-weight: 900;
}

.dropzone small {
  color: var(--muted);
}

.primary {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--amber);
  font-size: 14px;
}

.results {
  margin-top: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}

.summary-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.summary-card strong {
  display: block;
  margin-top: 3px;
  font-size: 28px;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-formula {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  background: var(--blue-soft);
  color: #344b7a;
  font-size: 13px;
  line-height: 1.6;
}

.table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 24px 18px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  max-height: 600px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

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

th {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 12px;
  background: #f7f8fa;
  color: #475467;
  text-align: left;
}

td {
  padding: 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

tr.warning-row {
  background: var(--amber-soft);
}

.cell-input {
  width: 100%;
  min-width: 130px;
  padding: 8px 9px;
  border: 1px solid #cfd5df;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.cell-input.invalid {
  border-color: #d92d20;
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.1);
}

.item-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-fields .cell-input {
  width: 64px;
  min-width: 64px;
}

.pill {
  display: inline-flex;
  align-items: center;
  margin: 0 5px 5px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f5;
  color: #475467;
  font-size: 12px;
}

.pill.urgent {
  background: #ffebe9;
  color: #b42318;
}

.pill.good {
  background: var(--green-soft);
  color: var(--green);
}

.pill.progress {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.pill.warning {
  background: #ffedc2;
  color: var(--amber);
}

.warning-list {
  margin: 5px 0 0;
  padding-left: 18px;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.5;
}

.empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.confirm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 22px 24px;
}

.success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 22px;
  border-color: #a6ddbd;
  background: var(--green-soft);
}

.success > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.success p {
  margin: 6px 0 0;
  color: #35644c;
}

.parsed-document-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 15px 18px;
  border: 1px solid #cbd8f4;
  border-radius: 12px;
  background: #f6f8ff;
}

.parsed-document-bar div {
  min-width: 0;
}

.parsed-document-bar span,
.parsed-document-bar strong,
.parsed-document-bar small {
  display: block;
}

.parsed-document-bar span,
.parsed-document-bar small {
  color: var(--muted);
  font-size: 12px;
}

.parsed-document-bar strong {
  margin: 3px 0;
  overflow-wrap: anywhere;
}

.parsed-document-bar a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.import-queue-panel {
  margin-top: 18px;
}

.import-batch-list {
  display: grid;
  gap: 12px;
  padding: 0 24px 24px;
}

.import-batch-card {
  padding: 17px;
  border: 1px solid #d7dfeb;
  border-radius: 12px;
  background: #f9fafb;
}

.import-batch-card.pending {
  border-color: #f0c88b;
  background: #fffbf4;
}

.import-batch-card.needs-reprint {
  border-color: #e07a32;
  box-shadow: 0 0 0 2px #ffead7 inset;
}

.batch-assignment-groups { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0; }
.assignment-group { display: inline-flex; gap: 9px; align-items: center; border: 1px solid #bdd8ff; border-radius: 12px; background: #eef6ff; padding: 5px 7px 5px 9px; color: #285d9b; font-size: 11px; }
.assignment-group > span { display: inline-flex; align-items: center; gap: 7px; }
.assignment-group a { border-radius: 8px; padding: 4px 7px; color: #174b8b; background: rgba(255,255,255,.8); font-weight: 800; text-decoration: none; }
.assignment-group.external { border-color: #f1c98f; background: #fff5e8; color: #9a5a05; }
.assignment-group.external a { color: #8b4c00; }

.batch-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.batch-heading div {
  min-width: 0;
}

.batch-heading strong,
.batch-heading span {
  display: block;
}

.batch-heading strong {
  overflow-wrap: anywhere;
}

.batch-heading div span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.print-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.print-badge.pending {
  background: #fff0d5;
  color: #9b5900;
}

.print-badge.printed {
  background: var(--green-soft);
  color: var(--green);
}

.batch-status-stack {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.store-disabled-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.batch-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.batch-counts span {
  padding: 5px 8px;
  border-radius: 7px;
  background: white;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.batch-print-info {
  margin: 11px 0 0;
  color: #667085;
  font-size: 12px;
}

.batch-note-quote {
  margin: 13px 0 0;
  border-left: 4px solid #9aabd0;
  border-radius: 0 8px 8px 0;
  background: #f4f6fb;
  padding: 10px 13px;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
}

.batch-note-empty {
  margin: 13px 0 0;
  color: #98a2b3;
  font-size: 12px;
}

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.batch-action {
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.batch-action.secondary {
  border: 1px solid #cbd3df;
  background: white;
  color: #344054;
}

.batch-action.primary-action {
  background: var(--blue);
  color: white;
}

.batch-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.batch-action.blocked-action:disabled {
  cursor: not-allowed;
  border: 1px solid #d0d5dd;
  background: #f2f4f7;
  color: #667085;
  opacity: 1;
}

.legacy-note {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.production-panel {
  margin-top: 18px;
}

.production-table-wrap {
  max-height: 460px;
}

.queue-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.task-name {
  display: inline-block;
  color: #27364f;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

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

.dispatch-overview h2 {
  margin: 4px 0 8px;
}

.dispatch-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  padding: 6px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: #e8edf5;
}

.dispatch-filters button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dispatch-filters button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(19, 33, 60, 0.08);
}

.dispatch-filters span {
  display: inline-flex;
  justify-content: center;
  min-width: 24px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(44, 97, 231, 0.1);
  padding: 2px 7px;
}

.dispatch-date-group {
  margin-bottom: 28px;
}

.dispatch-date-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
}

.dispatch-date-heading strong {
  color: var(--ink);
  font-size: 18px;
}

@media (max-width: 900px) {
  .hub-sidebar {
    position: static;
    width: auto;
    padding: 12px 16px;
  }

  .hub-brand {
    padding: 0 0 10px;
  }

  .hub-nav {
    display: flex;
    overflow-x: auto;
  }

  .hub-nav a {
    flex: 0 0 auto;
    padding: 9px 11px;
  }

  .hub-sidebar-foot {
    display: none;
  }

  .hub-content {
    margin-left: 0;
  }

  .compact-upload #uploadForm {
    grid-template-columns: 1fr;
  }

  .review-action-row,
  .workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .review-actions {
    flex-wrap: wrap;
  }

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

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

  .network-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-heading,
  .confirm-bar,
  .parsed-document-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .confirm-bar .primary {
    width: 100%;
  }

  .parsed-document-bar a {
    text-align: center;
  }

  .dispatch-overview {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hub-content .topbar {
    position: static;
  }

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

  .order-overview-grid {
    grid-template-columns: 1fr;
  }

  main {
    width: min(100% - 20px, 1240px);
    margin-top: 16px;
  }

  .topbar {
    min-height: 74px;
    padding: 12px 16px;
  }

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

  .worker-entry {
    display: none;
  }

  .eyebrow {
    display: none;
  }

  .steps {
    gap: 5px;
  }

  .steps li {
    justify-content: center;
    padding: 10px 6px;
    font-size: 12px;
  }

  .steps li span {
    display: none;
  }

  .upload-panel {
    gap: 18px;
    padding: 20px;
  }

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

  .summary-card:last-child {
    grid-column: 1 / -1;
  }

  .import-batch-list {
    padding: 0 16px 18px;
  }

  .batch-heading {
    gap: 10px;
  }

  .batch-action {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* 2026-07-31 workflow accuracy and compact interaction pass */
.compact-upload #uploadForm {
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) auto;
}

.compact-upload .dropzone,
.compact-upload .dropzone > * {
  min-width: 0;
}

.compact-upload .dropzone strong,
.compact-upload .dropzone small {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dropzone.is-dragging {
  border-color: var(--blue);
  background: #eaf1ff;
  box-shadow: 0 0 0 3px rgba(37, 94, 234, 0.12);
}

.preview-action,
.review-actions .primary,
.review-actions .step-done {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 9px;
}

.preview-action {
  border: 1px solid #b8c6e6;
  background: white;
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.submit-reminder {
  margin: 12px 0 2px;
  border-left: 4px solid var(--blue);
  border-radius: 0 9px 9px 0;
  background: #f2f6ff;
  padding: 10px 13px;
  color: #31507f;
  font-size: 13px;
  font-weight: 800;
}

.batch-note-field textarea {
  min-height: 42px;
  height: 42px;
}

.readonly-record {
  display: block;
  min-width: 180px;
  color: #1b2b46;
  font-weight: 800;
}

.readonly-item-fields {
  align-items: center;
  color: #344054;
  font-weight: 800;
}

.readonly-record.invalid,
.readonly-item-fields.invalid {
  color: #b42318;
}

.my-files-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(210px, auto) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.my-files-search input,
.my-files-search select {
  min-width: 0;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: white;
  padding: 10px 12px;
  font: inherit;
}

.my-files-mini-trend > div {
  height: 64px;
  align-items: stretch;
}

.trend-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  min-width: 24px;
  align-items: end;
  gap: 3px;
  text-align: center;
}

.trend-column i {
  position: relative;
  width: 100%;
  min-height: 0;
}

.trend-column i:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  z-index: 3;
  transform: translateX(-50%);
  border-radius: 6px;
  background: #13233f;
  padding: 4px 7px;
  color: white;
  font-style: normal;
  font-size: 11px;
  white-space: nowrap;
}

.trend-column small {
  color: #7b879b;
  font-size: 10px;
}

.my-file-day-group {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.my-file-day-group > h3 {
  margin: 4px 2px 0;
  color: #17233a;
  font-size: 16px;
}

.my-file-day-group > h3 small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.my-file-heading {
  grid-template-columns: auto minmax(220px, 1fr) minmax(240px, auto) auto;
  gap: 12px;
}

.my-file-summary-meta {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.drawer-source-file {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
  border-radius: 10px;
  background: #f2f6ff;
  padding: 12px;
}

.drawer-source-file span {
  color: var(--muted);
  font-size: 12px;
}

.drawer-source-file strong {
  overflow-wrap: anywhere;
}

.drawer-evidence button {
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  cursor: zoom-in;
  font-size: 10px;
  text-align: left;
}

.document-preview-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  width: min(660px, 96vw);
  overflow-y: auto;
  background: #f7f9fc;
  padding: 24px;
  box-shadow: -18px 0 50px rgba(13, 27, 51, 0.22);
}

.document-preview-search {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.document-preview-search input {
  border: 1px solid #cbd3df;
  border-radius: 9px;
  background: white;
  padding: 10px 12px;
  font: inherit;
}

.document-preview-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.document-preview-page {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.document-preview-page > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
}

.document-preview-page > div span {
  color: var(--muted);
}

.document-preview-page > button {
  width: 100%;
  border: 0;
  background: #eef2f7;
  padding: 0;
  cursor: zoom-in;
}

.document-preview-page img {
  display: block;
  width: 100%;
  height: auto;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(7, 15, 29, 0.88);
  padding: 28px;
}

.image-lightbox img {
  max-width: min(1400px, 96vw);
  max-height: 92vh;
  object-fit: contain;
}

.image-lightbox button {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  font-size: 26px;
}

.image-lightbox.hidden,
.document-preview-drawer.hidden {
  display: none;
}

@media (max-width: 900px) {
  .compact-upload #uploadForm,
  .my-files-search {
    grid-template-columns: 1fr;
  }

  .my-file-heading {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .my-file-summary-meta {
    grid-column: 2 / -1;
    grid-row: 2;
    text-align: left;
  }
}

/* V1.1 compact workspaces and production analytics */
.compact-summary {
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  overflow-x: auto;
}

.compact-summary .summary-card {
  min-width: 0;
}

.compact-summary .summary-card strong {
  white-space: nowrap;
  font-size: clamp(18px, 1.45vw, 24px);
}

.my-files-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 0.7fr)) minmax(260px, 1.5fr);
  gap: 10px;
  margin-bottom: 14px;
}

.my-files-dashboard article {
  display: grid;
  gap: 4px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  padding: 14px 16px;
}

.my-files-dashboard span {
  color: var(--muted);
  font-size: 12px;
}

.my-files-dashboard strong {
  font-size: 23px;
}

.my-files-mini-trend > div {
  display: flex;
  height: 42px;
  align-items: flex-end;
  gap: 8px;
}

.my-files-mini-trend i {
  flex: 1;
  min-width: 8px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #4b7df3, #245eea);
}

.my-file-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.my-file-search input {
  border: 1px solid #d5dce7;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
}

.my-file-card {
  padding: 0;
  overflow: hidden;
}

.my-file-card > summary {
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}

.my-file-card > summary::-webkit-details-marker,
.note-details > summary::-webkit-details-marker {
  display: none;
}

.my-file-card > summary::before {
  content: "›";
  flex: 0 0 auto;
  align-self: center;
  margin-right: 2px;
  color: #8692a6;
  font-size: 24px;
  transition: transform 0.16s ease;
}

.my-file-card[open] > summary::before {
  transform: rotate(90deg);
}

.my-file-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.my-file-heading > div {
  min-width: 0;
}

.my-file-heading strong,
.my-file-heading div > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.my-file-expanded {
  border-top: 1px solid var(--line);
  padding: 0 18px 16px;
  background: #fbfcfe;
}

.note-details {
  margin-top: 10px;
  border-radius: 9px;
  background: white;
  padding: 9px 11px;
}

.note-details > summary {
  cursor: pointer;
  color: #42506a;
  font-size: 12px;
  font-weight: 800;
}

.note-details .inline-note-editor {
  margin-top: 8px;
}

.note-details textarea {
  min-height: 50px;
}

.note-details button {
  margin-top: 7px;
  border: 1px solid #b8c7e8;
  border-radius: 7px;
  background: var(--blue-soft);
  padding: 7px 10px;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
}

.dispatch-card-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.dispatch-card-context {
  min-width: 0;
}

.dispatch-card-context .batch-note-quote,
.dispatch-card-context .batch-note-empty,
.dispatch-card-context .batch-print-info {
  margin-top: 8px;
  margin-bottom: 0;
}

.dispatch-card-compact-row .batch-actions {
  justify-content: flex-end;
  margin: 0;
}

.production-period-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 170px 170px auto;
  align-items: end;
  gap: 12px;
}

.production-period-toolbar h2 {
  margin: 3px 0 0;
}

.production-period-toolbar .cutoff-note {
  margin: 5px 0 0;
  font-size: 11px;
}

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

.production-period-toolbar input {
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: white;
  padding: 10px;
  font: inherit;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.8fr) minmax(540px, 1.4fr);
  gap: 14px;
}

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

.analytics-kpi-panel article,
.analytics-chart-panel,
.ranking-layout article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 15px;
}

.analytics-kpi-panel article {
  display: grid;
  gap: 4px;
}

.analytics-kpi-panel span,
.analytics-kpi-panel small,
.analytics-chart-panel span,
.ranking-layout article > div span {
  color: var(--muted);
  font-size: 11px;
}

.analytics-kpi-panel strong {
  font-size: 25px;
}

.analytics-chart-panel > div,
.ranking-layout article > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.analytics-chart-panel canvas {
  display: block;
  width: 100%;
  height: 220px;
}

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

.ranking-layout ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-layout li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-top: 1px solid #eef1f6;
}

.ranking-layout li:first-child {
  border-top: 0;
}

.ranking-layout .rank-number {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.ranking-layout li b {
  color: #43516b;
  font-size: 12px;
}

.ranking-layout .ranking-empty {
  display: block;
  padding: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

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

.production-order-panel {
  overflow: hidden;
}

.production-table-wrap {
  max-height: none;
  overflow: auto;
}

.production-table {
  min-width: 1240px;
}

.production-table-total {
  padding: 12px 2px 0;
  color: #43516b;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
}

.order-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.inline-copy {
  border: 1px solid #c8d4ec;
  border-radius: 6px;
  background: white;
  padding: 3px 6px;
  color: var(--blue);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.detail-order-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.detail-order-heading h2 {
  margin-bottom: 4px;
}

.detail-total {
  display: grid;
  gap: 3px;
  min-width: 126px;
  border-radius: 11px;
  background: var(--green-soft);
  padding: 10px 12px;
  text-align: right;
}

.detail-total span {
  color: var(--green);
  font-size: 11px;
}

.detail-total strong {
  font-size: 18px;
}

.detail-copy {
  margin-top: 8px;
}

.profile-rank-card {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, #eef3ff, #f7f9ff);
  padding: 14px;
}

.profile-rank-card span {
  color: var(--muted);
  font-size: 12px;
}

.profile-rank-card strong {
  color: #244994;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-toolbar .copy-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.table-import-hint {
  margin-top: -8px;
}

.admin-table-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, auto)) auto;
  align-items: end;
  gap: 10px;
  margin: 4px 0 12px;
  border: 1px solid #dce5f4;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(246, 249, 255, .96), rgba(255, 255, 255, .96));
  padding: 11px 12px;
}

.admin-table-filters label {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.admin-table-filters input,
.admin-table-filters select {
  min-height: 38px;
  border: 1px solid #cfd9e8;
  border-radius: 9px;
  background: white;
  padding: 7px 10px;
  color: #172033;
}

.admin-filter-count {
  align-self: center;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-empty-row {
  padding: 30px !important;
  color: #667085;
  text-align: center;
}

@media (max-width: 1100px) {
  .admin-table-filters { grid-template-columns: 1fr 1fr; }
  .admin-filter-search { grid-column: 1 / -1; }
}

.editing-row {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.table-edit,
.table-cancel {
  border: 1px solid #cbd3df;
  border-radius: 8px;
  background: white;
  padding: 7px 11px;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
}

.table-save.confirmed {
  border-color: #96d5b2;
  background: var(--green-soft);
  color: var(--green);
}

.table-cancel {
  border-color: #f1b0aa;
  background: #fff2f0;
  color: #b42318;
}

.table-edit-actions {
  display: flex;
  gap: 6px;
}

.read-identity {
  display: grid;
  gap: 3px;
}

.read-identity small,
.store-summary {
  color: var(--muted);
  font-size: 12px;
}

.role-badge,
.account-state {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.role-badge {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.account-state.active {
  background: var(--green-soft);
  color: var(--green);
}

.account-state.inactive {
  background: #f2f4f7;
  color: #667085;
}

.store-picker {
  position: relative;
}

.store-picker > summary {
  min-width: 150px;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: white;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.store-picker-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 5px);
  left: 0;
  display: grid;
  min-width: 220px;
  max-height: 260px;
  overflow-y: auto;
  gap: 7px;
  border: 1px solid #d8deea;
  border-radius: 10px;
  background: white;
  padding: 10px;
  box-shadow: 0 16px 35px rgba(22, 32, 51, 0.14);
}

.store-picker-menu .select-all-stores {
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
  font-weight: 900;
}

.store-picker-menu small {
  color: var(--muted);
}

.worker-admin-table {
  min-width: 1120px;
}

.external-worker-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #cbd9f5;
  border-radius: 12px;
  background: #f5f8ff;
}
.external-worker-toolbar label { display: flex; align-items: center; gap: 8px; }
.external-worker-toolbar select { min-width: 180px; }
.external-order-choice { width: 16px; height: 16px; flex: 0 0 auto; }

.status.success {
  color: var(--green);
}

.status.error {
  color: #b42318;
}

@media (max-width: 1100px) {
  .my-files-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 900px) {
  .compact-summary {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }

  .dispatch-card-compact-row,
  .production-period-toolbar {
    grid-template-columns: 1fr;
  }

  .dispatch-card-compact-row .batch-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 560px) {
  .my-files-dashboard,
  .analytics-kpi-panel,
  .ranking-layout {
    grid-template-columns: 1fr 1fr;
  }

  .my-file-search {
    grid-template-columns: 1fr;
  }

  .my-file-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .my-file-heading > .print-badge {
    grid-column: 2;
    justify-self: start;
  }

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

  .analytics-chart-panel {
    padding: 10px;
  }

  .profile-rank-card {
    grid-template-columns: auto 1fr;
  }
}

/* Production query: compact filters, sticky status table and semantic colors */
.production-period-toolbar {
  padding-top: 2px;
}

.production-order-panel > .section-heading {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -18px -18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 15px 18px 12px;
  backdrop-filter: blur(10px);
}

.production-filters {
  grid-template-columns: minmax(300px, 1fr) 150px 180px minmax(190px, auto);
  align-items: start;
}

.production-filters textarea {
  width: 100%;
  min-height: 42px;
  max-height: 150px;
  resize: vertical;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  line-height: 20px;
}

.production-store-picker {
  position: relative;
}

.production-store-picker > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: white;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
}

.production-store-picker > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 15;
  min-width: 240px;
  max-height: 250px;
  overflow: auto;
  border: 1px solid #d5dce7;
  border-radius: 10px;
  background: white;
  padding: 9px;
  box-shadow: 0 14px 30px rgba(22, 38, 67, 0.15);
}

.production-store-picker label {
  display: flex;
  gap: 8px;
  padding: 7px;
  cursor: pointer;
}

.production-table-wrap {
  max-height: 560px;
}

.production-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f7f9fc;
  box-shadow: 0 1px 0 var(--line);
}

.copy-column-heading {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: copy;
  font: inherit;
  font-weight: 800;
}

.copy-column-heading:hover {
  color: var(--blue);
  text-decoration: underline;
}

.status-summary.pending-print {
  border-color: #c7b7ef;
  background: #f5f1ff;
  color: #6941c6;
}

.status-summary.pending-claim {
  border-color: #f1b7b2;
  background: #fff1f0;
  color: #b42318;
}

.status-summary.in-progress {
  border-color: #f0cf8f;
  background: #fff8e8;
  color: #9a6700;
}

.status-summary.completed {
  border-color: #a8dfc5;
  background: #edf9f3;
  color: #177a4d;
}

.status-summary strong,
.status-summary span {
  color: inherit;
}

.production-status.pending_claim {
  background: #fff0ef;
  color: #b42318;
}

.production-status.in_progress {
  background: #fff6df;
  color: #9a6700;
}

.order-link {
  cursor: pointer;
}

/* Keep the 07-31 trend ratios and date labels above earlier V1.1 rules. */
.my-files-mini-trend > div {
  height: 64px;
  align-items: stretch;
}

.my-files-mini-trend .trend-column i {
  min-height: 0;
}

@media (max-width: 1120px) {
  .production-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .production-filters {
    grid-template-columns: 1fr;
  }
}

/* Personnel management sub-pages and stable edit actions */
.admin-subnav {
  display: grid;
  gap: 5px;
  margin: -2px 18px 12px;
  border-left: 1px solid rgba(145, 171, 216, 0.32);
  padding-left: 10px;
}

.admin-subnav a {
  border-radius: 8px;
  padding: 8px 10px;
  color: #9eb4d8;
  font-size: 12px;
  text-decoration: none;
}

.admin-subnav a:hover,
.admin-subnav a.active {
  background: rgba(75, 125, 243, 0.18);
  color: white;
}

.admin-workspace {
  gap: 10px;
}

.admin-global-status:empty {
  display: none;
}

.admin-workspace > .panel {
  min-height: 0;
}

.admin-workspace .section-heading {
  align-items: center;
  margin-bottom: 10px;
}

.admin-toolbar {
  flex-wrap: nowrap;
}

.staff-admin-table {
  min-width: 1100px;
}

.staff-admin-table th:nth-child(2),
.staff-admin-table td:nth-child(2) { width: 245px; }
.staff-admin-table th:nth-child(3),
.staff-admin-table td:nth-child(3) { width: 150px; }
.staff-admin-table th:nth-child(4),
.staff-admin-table td:nth-child(4) { width: 190px; }
.staff-admin-table th:nth-child(5),
.staff-admin-table td:nth-child(5) { width: 175px; }
.staff-admin-table th:nth-child(7),
.staff-admin-table td:nth-child(7) { width: 145px; }

.table-edit-actions {
  flex-wrap: nowrap;
  min-width: 126px;
}

.table-edit-actions button {
  flex: 1 0 58px;
  white-space: nowrap;
}

.role-badge.role-operations {
  background: #e8f1ff;
  color: #1d4ed8;
}

.role-badge.role-dispatcher {
  background: #fff4df;
  color: #9a6700;
}

.role-badge.role-fulfillment {
  background: #eaf8f1;
  color: #177a4d;
}

.role-badge.role-admin {
  background: #f2ebff;
  color: #6941c6;
}

.salary-pending-note {
  margin: 0 0 14px;
  border-left: 4px solid #9b8bc4;
  border-radius: 0 9px 9px 0;
  background: #f7f4fc;
  padding: 10px 13px;
  color: #5b4b7f;
  font-size: 13px;
}

/* 2026-08 detail pass: focused login, compact files, production closure */
body.is-login-view {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 24%, rgba(89, 111, 255, 0.22), transparent 34%),
    radial-gradient(circle at 16% 82%, rgba(40, 203, 192, 0.12), transparent 30%),
    linear-gradient(135deg, #e9edf6 0%, #f7f9fc 48%, #e8eefc 100%);
  background-size: 115% 115%;
  animation: loginAtmosphere 12s ease-in-out infinite alternate;
}

@keyframes loginAtmosphere {
  from { background-position: 0 0; }
  to { background-position: 100% 50%; }
}

.is-login-view .hub-sidebar,
.is-login-view .topbar {
  display: none !important;
}

.is-login-view .hub-content {
  min-height: 100vh;
  margin-left: 0;
}

.is-login-view main {
  display: grid;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  padding: 34px;
}

.is-login-view .staff-login-panel {
  display: block;
  position: relative;
  width: min(1080px, 100%);
  max-width: none;
  min-height: 590px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  padding: 82px 64px 68px;
  box-shadow: 0 30px 90px rgba(30, 48, 84, 0.18);
  backdrop-filter: blur(22px);
}

.is-login-view .staff-login-panel::before {
  content: "";
  position: absolute;
  inset: 18px 18px 18px 48%;
  border-radius: 24px;
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.95), transparent 18%),
    radial-gradient(circle at 70% 68%, rgba(75, 96, 255, 0.7), transparent 34%),
    linear-gradient(145deg, rgba(239, 242, 255, 0.8), rgba(143, 158, 255, 0.38));
  box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.62);
}

.is-login-view .staff-login-panel::after {
  content: "";
  position: absolute;
  top: 150px;
  right: 14%;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 31% 43% 35% 47%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), transparent 20%),
    linear-gradient(145deg, rgba(89, 111, 255, 0.84), rgba(114, 235, 230, 0.34));
  box-shadow:
    inset 18px 18px 38px rgba(255, 255, 255, 0.42),
    inset -22px -18px 34px rgba(39, 48, 145, 0.25),
    28px 38px 65px rgba(59, 73, 172, 0.25);
  transform: rotate(12deg);
  animation: fluidCube 7s ease-in-out infinite alternate;
}

@keyframes fluidCube {
  from { transform: translateY(0) rotate(9deg) scale(0.98); border-radius: 31% 43% 35% 47%; }
  to { transform: translateY(-18px) rotate(16deg) scale(1.03); border-radius: 44% 31% 48% 35%; }
}

.is-login-view .staff-login-panel > * {
  position: relative;
  z-index: 2;
  width: min(410px, 40%);
  max-width: 410px;
  writing-mode: horizontal-tb;
}

.is-login-view .staff-login-panel .section-label {
  white-space: nowrap;
}

.is-login-view .staff-login-panel h2 {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  white-space: nowrap;
}

.is-login-view .staff-login-panel > .muted {
  max-width: 390px;
  margin-top: 18px;
  line-height: 1.8;
}

.is-login-view .staff-login-form {
  display: grid;
  width: min(410px, 40%);
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

.is-login-view .staff-login-form label,
.is-login-view .staff-login-form input,
.is-login-view .staff-login-form .primary {
  width: 100%;
  min-width: 0;
}

.is-login-view .staff-login-form input {
  min-height: 50px;
  background: rgba(255, 255, 255, 0.78);
}

.is-login-view .staff-login-form .primary {
  min-height: 50px;
}

.is-login-view .test-account-note {
  max-width: 390px;
  line-height: 1.65;
}

.my-file-heading {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.my-file-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.my-file-title-line strong {
  min-width: 0;
}

.my-file-title-line .print-badge {
  display: inline-flex;
  flex: 0 0 auto;
}

.my-file-summary-meta {
  justify-self: end;
}

.danger-outline {
  border-color: #efb5ae !important;
  color: #b42318 !important;
}

.danger-outline:hover {
  background: #fff1f0 !important;
}

.batch-heading .production-day-hint {
  display: inline-block;
  margin-top: 6px;
  border-radius: 999px;
  background: #eef3ff;
  padding: 4px 8px;
  color: #3157a4;
  font-size: 11px;
  font-weight: 800;
}

.batch-action.action-done {
  border-color: #a6dac0;
  background: #eaf8f1;
  color: #177a4d;
}

.hub-toast-container {
  position: fixed;
  z-index: 100;
  top: 22px;
  right: 22px;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 9px;
}

.hub-toast {
  display: grid !important;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  border: 1px solid rgba(150, 170, 205, 0.45);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 16px;
  box-shadow: 0 18px 45px rgba(24, 40, 72, 0.18);
  backdrop-filter: blur(16px);
  animation: hubToastIn 0.22s ease-out;
}

.hub-toast strong,
.hub-toast span {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.45;
}
.hub-toast span { color: var(--muted); font-size: 12px; }
.hub-toast.leaving { opacity: 0; transform: translateY(-12px); transition: 0.25s ease; }
@keyframes hubToastIn { from { opacity: 0; transform: translateY(-12px); } }

.trend-canvas-wrap {
  position: relative;
  display: block !important;
  margin: 0 !important;
}

.trend-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 142px;
  gap: 3px;
  pointer-events: none;
  border: 1px solid rgba(185, 198, 223, 0.7);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 10px;
  box-shadow: 0 10px 26px rgba(26, 42, 74, 0.16);
  font-size: 11px;
  backdrop-filter: blur(10px);
}

.completion-ring-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 15px;
}

.completion-ring-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.completion-ring-panel > div:first-child span { color: var(--muted); font-size: 11px; }
.completion-ring-list { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); align-items: start; gap: 10px; }
.completion-ring-item { display: grid; width: 100%; grid-template-rows: 72px 20px 18px; align-content: start; place-items: center; gap: 5px; min-height: 120px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.completion-ring-item:disabled { cursor: default; }
.completion-ring-item strong,.completion-ring-item small { min-height: 18px; line-height: 18px; white-space: nowrap; }
.completion-ring-item small { color: var(--muted); font-size: 10px; }
.completion-ring {
  --ring-color: #d8dee9;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--rate) * 1%), #edf0f5 0);
  align-self: start;
}
.completion-ring::before { content: ""; grid-area: 1/1; width: 54px; height: 54px; border-radius: 50%; background: white; }
.completion-ring i { z-index: 1; grid-area: 1/1; font-size: 13px; font-style: normal; font-weight: 900; }
.completion-ring-item.complete .completion-ring { --ring-color: #20a66d; }
.completion-ring-item.warning .completion-ring { --ring-color: #e2a126; }
.completion-ring-item.danger .completion-ring { --ring-color: #dc5b50; }

.ranking-layout ol:not(.expanded) li:nth-child(n+6) { display: none; }
.ranking-layout ol.expanded { max-height: 350px; overflow-y: auto; padding-right: 4px; }
.ranking-toggle { margin-top: 8px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 800; }
.ranking-layout article > div span b { color: var(--ink); font-size: 12px; }

.production-summary { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.production-filters { grid-template-columns: minmax(280px, 1fr) 150px 150px 170px minmax(180px, auto); }
.production-filters > input[type="date"] { min-height: 42px; }

.admin-page main {
  width: min(1520px, calc(100% - 32px));
}

.hub-nav-after-subnav {
  margin-top: 0;
}

.admin-global-status {
  position: fixed;
  z-index: 90;
  top: 20px;
  right: 22px;
  width: min(380px, calc(100vw - 32px));
  min-height: 0;
  border: 1px solid #a6ddbd;
  border-radius: 12px;
  background: rgba(232, 247, 239, 0.94);
  padding: 13px 15px;
  color: #177a4d;
  box-shadow: 0 16px 38px rgba(23, 79, 55, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px);
  transition: 0.22s ease;
  backdrop-filter: blur(12px);
}

.admin-global-status.visible { opacity: 1; transform: translateY(0); }
.admin-global-status.error { border-color: #efb5ae; background: rgba(255, 241, 240, 0.96); color: #b42318; }
.store-summary { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-admin-table { min-width: 1180px; }
.admin-table-wrap { max-width: 100%; }
.store-picker > summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salary-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.admin-workspace, .admin-workspace > .panel, .salary-workspace, .salary-workspace .section-heading { min-width: 0; max-width: 100%; }
.salary-workspace .section-heading { flex-wrap: wrap; }
.salary-workspace .admin-toolbar { flex-wrap: wrap; }
.salary-toolbar input { min-height: 40px; }
.salary-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.salary-summary article { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.salary-summary span { color: var(--muted); font-size: 12px; }
.salary-summary strong { font-size: 23px; }
.salary-matrix-wrap { max-height: 440px; }
.salary-matrix { min-width: 1180px; }
.salary-matrix th, .salary-matrix td { white-space: nowrap; text-align: right; }
.salary-matrix th:first-child, .salary-matrix td:first-child { position: sticky; left: 0; z-index: 2; background: white; text-align: left; }
.salary-matrix thead th:first-child { background: #f5f7fb; }
.salary-total { background: #fff6d8; color: #a44b00; font-weight: 900; }
.salary-detail-block, .pricing-rule-details { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.salary-detail-block > summary, .pricing-rule-details > summary { cursor: pointer; font-weight: 900; }
.salary-detail-block .admin-table-wrap, .pricing-rule-details .pricing-admin-grid { margin-top: 14px; }
.salary-records { min-width: 1050px; }
.salary-report-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0;
  border-radius: 12px;
  background: #eef2f8;
  padding: 5px;
}
.salary-report-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5e6d86;
  font-weight: 800;
  cursor: pointer;
}
.salary-report-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(20, 41, 78, 0.08);
}
.salary-category-table { min-width: 1460px; }
.salary-category-table th,
.salary-category-table td,
.salary-ranking-table th,
.salary-ranking-table td,
.salary-audit-table th,
.salary-audit-table td { white-space: nowrap; }
.salary-artisan-picker {
  display: flex;
  width: min(420px, 100%);
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.salary-artisan-picker select { min-width: 220px; }
.salary-audit-table { min-width: 1280px; }
.salary-person-view { margin-top: 24px; }
.salary-person-view .section-heading { align-items: end; margin-bottom: 12px; }
.salary-person-view h3 { margin: 2px 0 0; font-size: 20px; }
.salary-person-cards { display: grid; gap: 10px; }
.salary-person-card {
  overflow: hidden;
  border: 1px solid #ded5c5;
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.86);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.salary-person-card:hover { border-color: #c9b99f; box-shadow: 0 9px 24px rgba(73, 55, 30, .08); }
.salary-person-card[open] { border-color: #cdbb9e; box-shadow: 0 12px 28px rgba(73, 55, 30, .1); }
.salary-person-card > summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(105px, .8fr));
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
}
.salary-person-card > summary::-webkit-details-marker { display: none; }
.salary-person-card > summary span { display: grid; gap: 3px; }
.salary-person-card > summary small { color: var(--muted); font-size: 12px; font-weight: 500; }
.salary-person-card > summary strong { color: #182337; font-size: 18px; }
.salary-person-card > summary .salary-person-name strong { font-size: 17px; }
.salary-person-card > summary .salary-person-amount { color: #c85b00; font-size: 21px; }
.salary-person-detail { border-top: 1px solid #e7dece; background: rgba(255, 255, 255, .72); }
.salary-person-detail table { min-width: 760px; }
.salary-person-detail th, .salary-person-detail td { vertical-align: middle; }

.admin-task-adjustment {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d9e3f5;
  border-radius: 12px;
  background: #f7f9fd;
}

.admin-task-adjustment label {
  display: grid;
  flex: 1;
  gap: 6px;
  color: #56647c;
  font-size: 12px;
}

.admin-task-adjustment select,
.admin-task-adjustment button {
  min-height: 38px;
  border: 1px solid #c8d5ee;
  border-radius: 9px;
  padding: 0 12px;
}

.admin-task-adjustment button {
  background: #245eea;
  color: #fff;
  cursor: pointer;
}
.quality-detail-note { border-left: 3px solid #dc5b50; background: #fff5f3; padding: 8px 10px; color: #8b2d26; font-size: 12px; }
.quality-history { display: grid; gap: 8px; margin-top: 18px; }
.quality-history article { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; }
.quality-history article p { margin: 0; color: var(--muted); }
.production-status.qc_rework { background: #fff0ed; color: #b42318; }
.production-status.qc_review { background: #fff7df; color: #9a6700; }

/* 发货质检：沿用 Production Hub 的信息密度，在手机上切换为现场操作视图。 */
.quality-workspace { display: grid; min-width: 0; gap: 18px; }
.quality-workspace > * { width: 100%; min-width: 0; max-width: 100%; }
.quality-toolbar { display: grid; width: 100%; min-width: 0; max-width: 100%; grid-template-columns: minmax(240px, 1fr) 145px 145px 160px 160px 76px; align-items: end; gap: 10px; }
.quality-toolbar > * { min-width: 0; }
.quality-toolbar input, .quality-toolbar select { width: 100%; }
.quality-toolbar > button { min-width: 72px; white-space: nowrap; }
.quality-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.quality-toolbar input, .quality-toolbar select { min-height: 42px; }
.quality-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.quality-kpi { display: grid; gap: 8px; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 16px; cursor: pointer; font: inherit; transition: transform .16s ease, box-shadow .16s ease; }
.quality-kpi:hover, .quality-kpi:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(38,65,118,.12); }
.quality-kpi.active { outline: 2px solid rgba(36,94,234,.28); outline-offset: 2px; }
.quality-kpi span { color: var(--muted); font-size: 12px; }
.quality-kpi strong { font-size: 26px; }
.quality-kpi strong small { font-size: 12px; color: var(--muted); }
.quality-kpi.reject, .quality-kpi.failed { border-color: #efb5ae; background: #fff5f3; color: #b42318; }
.quality-kpi.review { border-color: #efcf8a; background: #fff9eb; color: #9a6700; }
.quality-kpi.reviewed { border-color: #b9c9f7; background: #f3f6ff; color: #2459c4; }
.quality-kpi.pass { border-color: #a6ddbd; background: #effaf4; color: #177a4d; }
.quality-chart-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.quality-chart-card { display: grid; gap: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 18px; }
.quality-chart-card > div:first-child { display: flex; justify-content: space-between; gap: 16px; }
.quality-chart-card > div:first-child span { color: var(--muted); font-size: 11px; }
.quality-bars { display: grid; gap: 10px; }
.quality-bars > div { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; font-size: 12px; }
.quality-bars i { height: 12px; overflow: hidden; border-radius: 999px; background: #edf1f7; }
.quality-bars b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f0a056, #db554b); }
.quality-worker-ranking { display: grid; max-height: 250px; gap: 8px; overflow-y: auto; padding: 0; list-style: none; }
.quality-worker-ranking li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.quality-worker-ranking li.empty { display: block; color: var(--muted); }
.quality-worker-ranking i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: #edf3ff; color: var(--blue); font-style: normal; font-weight: 800; }
.quality-search-form { display: grid; grid-template-columns: minmax(0, 1fr) 150px 110px; gap: 10px; }
.quality-search-form input { min-height: 48px; font-size: 17px; }
.quality-camera-scan { min-height: 48px; }
.quality-order-result { display: grid; gap: 12px; margin-top: 14px; }
.quality-order-heading, .quality-task > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quality-order-heading > span, .quality-task span { color: var(--muted); font-size: 12px; }
.quality-task-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.quality-task { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.quality-task.qc_rework { border-color: #efb5ae; background: #fff5f3; }
.quality-task.qc_review { border-color: #efcf8a; background: #fff9eb; }
.quality-task p, .quality-task small { margin: 0; color: var(--muted); font-size: 12px; }
.quality-table-wrap { max-height: 430px; overflow: auto; }
.quality-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.quality-table th, .quality-table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; font-size: 12px; }
.quality-table thead { position: sticky; z-index: 2; top: 0; background: #f7f9fc; }
.quality-table td em { display: inline-flex; margin: 2px; border-radius: 999px; background: #fff0ed; padding: 3px 7px; color: #b42318; font-style: normal; }
.quality-deduction-note { display: block; margin-top: 5px; color: #8a5b00; white-space: nowrap; }
.quality-result { display: inline-flex; border-radius: 999px; padding: 4px 8px; }
.quality-result.pass { background: #e9f7ef; color: #177a4d; }
.quality-result.reject { background: #fff0ed; color: #b42318; }
.quality-result.pending { background: #fff7df; color: #9a6700; }
.quality-inspection-intro { margin: 0; border-radius: 10px; background: #f3f6fb; padding: 11px 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.quality-dialog { width: min(620px, calc(100vw - 28px)); border: 0; border-radius: 18px; padding: 24px; box-shadow: 0 30px 80px rgba(17, 32, 61, 0.28); }
.quality-dialog::backdrop { background: rgba(16, 29, 54, 0.48); backdrop-filter: blur(4px); }
.quality-dialog form { display: grid; gap: 16px; }
.quality-dialog form > label { display: grid; gap: 7px; }
.quality-result-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quality-result-switch label { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.quality-dialog fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
#inspectionReasonTags { display: flex; flex-wrap: wrap; gap: 8px; }
.quality-tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: #f2f5fa; padding: 7px 10px; }
.reason-dialog textarea { width: 100%; margin: 12px 0; }
.quality-mobile-panel,
.quality-bottom-nav { display: none; }
.quality-personal-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.quality-personal-summary article { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.quality-personal-summary span,
.quality-personal-list small { color: var(--muted); font-size: 11px; }
.quality-personal-summary strong { font-size: 20px; }
.quality-personal-list { display: grid; gap: 9px; }
.quality-personal-list article { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.quality-personal-list article div { display: grid; gap: 2px; }
.quality-personal-list article div span { color: var(--muted); font-size: 11px; }
.quality-personal-list article small { grid-column: 1 / -1; }
.quality-personal-case { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; text-align: left; }
.quality-personal-case span { display: grid; gap: 4px; }
.quality-personal-case small { color: var(--muted); }
.quality-personal-case em { color: #2459c4; font-style: normal; }
.quality-case-dialog { width: min(760px, calc(100vw - 24px)); }
.quality-case-dialog > section { margin-top: 18px; }
.quality-case-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.quality-case-meta span { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; color: var(--muted); font-size: 12px; }
.quality-case-meta strong { color: var(--ink); font-size: 14px; }
.quality-case-images { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0; }
.quality-case-images a { flex: 0 0 128px; }
.quality-case-images img { width: 128px; height: 128px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.quality-review-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.quality-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quality-review-actions button { border: 1px solid #b9c9f7; border-radius: 10px; background: #f5f7ff; padding: 10px 12px; color: #173f94; }
.quality-annotation-stage { max-height: 62vh; overflow: auto; border-radius: 14px; background: #10182a; padding: 8px; }
.quality-annotation-stage canvas { display: block; max-width: 100%; height: auto; margin: auto; touch-action: none; cursor: crosshair; }
.quality-annotation-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.quality-profile-details { display: grid; margin: 16px 0; }
.quality-profile-details span { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--muted); }
.quality-profile-details strong { color: var(--ink); }
.quality-profile-logout { width: 100%; min-height: 46px; }
.hub-toast { position: relative; padding-right: 42px; }
.hub-toast > button { position: absolute; top: 8px; right: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.hub-toast.hub-toast-error { border-color: #efb5ae; }
.hub-toast.leaving { opacity: 0; transform: translateX(28px); transition: 0.25s ease; }
@keyframes hubToastIn { from { opacity: 0; transform: translateX(28px); } }

@media (max-width: 1050px) {
  .quality-toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .quality-toolbar > div { grid-column: 1 / -1; }
  .quality-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .is-login-view main { padding: 16px; }
  .is-login-view .staff-login-panel { min-height: auto; padding: 46px 28px; }
  .is-login-view .staff-login-panel > *,
  .is-login-view .staff-login-form { width: 100%; max-width: none; }
  .is-login-view .staff-login-panel h2 { white-space: normal; }
  .is-login-view .staff-login-panel::before,
  .is-login-view .staff-login-panel::after { display: none; }
  .completion-ring-list { grid-template-columns: repeat(4, minmax(70px, 1fr)); }
  .production-filters { grid-template-columns: 1fr 1fr; }
  .production-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .salary-summary { grid-template-columns: 1fr 1fr; }
  .salary-person-card > summary { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .salary-person-card > summary .salary-person-name { grid-column: 1 / -1; }
  .quality-page .hub-sidebar { display: none; }
  .quality-page .hub-content { width: 100%; margin-left: 0; }
  .quality-page main { width: calc(100% - 20px); }
  .quality-page .topbar { position: sticky; padding: 12px 14px; }
  .quality-page .topbar-actions { gap: 6px; }
  .quality-page .staff-identity { max-width: 92px; font-size: 11px; }
  .quality-page .local-badge { display: none; }
  .quality-management-section { display: none !important; }
  .quality-mobile-panel { display: block; }
  .quality-workspace { padding-bottom: 76px; }
  .quality-bottom-nav {
    position: fixed;
    z-index: 40;
    right: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    width: min(calc(100% - 24px), 560px);
    grid-template-columns: repeat(3, 1fr);
    transform: translateX(50%);
    border: 1px solid #dfe5ed;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    padding: 6px;
    box-shadow: 0 12px 34px rgba(21, 31, 51, 0.16);
    backdrop-filter: blur(12px);
  }
  .quality-bottom-nav button { min-height: 46px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 800; }
  .quality-bottom-nav button.active { background: #eaf1ff; color: #2455bd; }
  .quality-toolbar { display: flex; flex-wrap: wrap; overflow: hidden; }
  .quality-toolbar > div { flex: 1 0 100%; }
  .quality-toolbar > label,
  .quality-toolbar > select { flex: 1 1 calc(50% - 6px); width: calc(50% - 6px); max-width: calc(50% - 6px); }
  .quality-toolbar > button { flex: 1 0 100%; }
  .quality-inspector, .quality-chart-card { min-width: 0; overflow: hidden; }
  .quality-inspector.hidden,
  .quality-mobile-panel.hidden { display: none !important; }
  .quality-search-form input { min-width: 0; }
  .quality-chart-grid { grid-template-columns: 1fr; }
  .quality-summary { grid-template-columns: 1fr 1fr; }
  .quality-search-form { grid-template-columns: 1fr 1fr; }
  .quality-search-form input { grid-column: 1 / -1; }
  .quality-personal-summary { grid-template-columns: 1fr 1fr; }
  .quality-case-meta { grid-template-columns: 1fr 1fr; }
  .quality-search-form { grid-template-columns: 1fr; }
  .quality-task-list { grid-template-columns: 1fr; }
}
