/* LuckyShop Production Hub · V2 visual foundation
   Presentation-only overrides: no business state or data behavior lives here. */
:root {
  --ink: #172033;
  --muted: #66758c;
  --line: #dfe5ef;
  --paper: #ffffff;
  --canvas: #f3f6fa;
  --blue: #356de8;
  --blue-dark: #1f4fb8;
  --blue-soft: #eaf1ff;
  --green: #18845b;
  --green-soft: #e9f8f1;
  --amber: #a96408;
  --amber-soft: #fff5df;
  --red: #c63f38;
  --red-soft: #fff0ee;
  --v2-navy: #101f3a;
  --v2-navy-2: #152a4e;
  --v2-shadow-sm: 0 6px 20px rgba(27, 46, 79, 0.06);
  --v2-shadow-md: 0 16px 44px rgba(27, 46, 79, 0.1);
  --v2-radius: 16px;
  --v2-radius-sm: 11px;
}

body.v2-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 4%, rgba(86, 125, 236, 0.09), transparent 24%),
    linear-gradient(180deg, #f6f8fb 0, var(--canvas) 42%, #eef2f7 100%);
  letter-spacing: 0.005em;
}

.v2-shell .hub-sidebar {
  width: 228px;
  border-right: 1px solid rgba(160, 183, 225, 0.12);
  background:
    radial-gradient(circle at 22% 4%, rgba(74, 115, 210, 0.24), transparent 24%),
    linear-gradient(180deg, var(--v2-navy) 0%, #0d1a30 100%);
  padding: 20px 14px;
  box-shadow: 16px 0 48px rgba(10, 25, 50, 0.08);
}

.v2-shell .hub-content { margin-left: 228px; }

.v2-shell .hub-brand {
  position: relative;
  min-height: 62px;
  padding: 2px 8px 22px 52px;
}

.v2-shell .hub-brand::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 8px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 11px 13px 10px 15px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.95), transparent 17%),
    linear-gradient(145deg, #7197ff, #52d5d0);
  box-shadow: 0 10px 24px rgba(47, 98, 220, 0.34), inset -6px -7px 12px rgba(32, 68, 170, 0.18);
  transform: rotate(-7deg);
}

.v2-shell .hub-brand span { color: #8fb1ff; font-size: 10px; letter-spacing: .18em; }
.v2-shell .hub-brand strong { font-size: 19px; letter-spacing: -.02em; }

.v2-shell .hub-brand::after {
  content: "V2";
  display: inline-flex;
  width: max-content;
  margin-top: 4px;
  border: 1px solid rgba(143, 177, 255, .28);
  border-radius: 999px;
  background: rgba(75, 113, 197, .16);
  padding: 1px 6px;
  color: #aac2fa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.v2-shell .hub-nav { gap: 5px; }

.v2-shell .hub-nav > a {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 12px 8px 34px;
  color: #aab8cf;
  font-weight: 700;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.v2-shell .hub-nav > a::before {
  content: "";
  position: absolute;
  left: 16px;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  opacity: .76;
  transform: rotate(45deg);
}

.v2-shell .hub-nav > a:hover {
  border-color: rgba(147, 174, 226, .12);
  background: rgba(78, 111, 176, .12);
  color: #eef4ff;
  transform: translateX(2px);
}

.v2-shell .hub-nav > a.active {
  border-color: rgba(143, 177, 255, .2);
  background: linear-gradient(110deg, rgba(68, 110, 201, .42), rgba(50, 81, 142, .24));
  color: #fff;
  box-shadow: inset 3px 0 #7aa0ff, 0 10px 22px rgba(4, 15, 38, .14);
}

.v2-shell .hub-nav > a.active::before { border-color: #9bb9ff; background: #7da4ff; box-shadow: 0 0 0 4px rgba(105, 151, 255, .1); }

.v2-shell .hub-sidebar-foot {
  border-color: rgba(255,255,255,.08);
  color: #9faec6;
  line-height: 1.55;
}

.v2-shell .topbar {
  min-height: 74px;
  border-bottom: 1px solid rgba(150, 169, 201, .14);
  background: rgba(16, 31, 58, .96);
  padding: 11px clamp(22px, 3vw, 48px);
  box-shadow: 0 10px 32px rgba(19, 38, 69, .08);
  backdrop-filter: blur(18px) saturate(130%);
}

.v2-shell .topbar h1 { font-size: clamp(23px, 1.8vw, 29px); letter-spacing: -.035em; }
.v2-shell .eyebrow { color: #8eaff8; letter-spacing: .12em; }
.v2-shell .topbar-actions { gap: 8px; }
.v2-shell .staff-identity { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-shell .header-button,
.v2-shell .local-badge {
  border-color: rgba(194, 211, 244, .22);
  background: rgba(255,255,255,.035);
}

.v2-shell .header-button { transition: background .18s ease, border-color .18s ease; }
.v2-shell .header-button:hover { border-color: rgba(194, 211, 244, .42); background: rgba(255,255,255,.08); }

.v2-shell main { width: min(1360px, calc(100% - 32px)); margin-top: 22px; }
.v2-shell .workspace-section,
.v2-shell .production-workspace,
.v2-shell .admin-workspace,
.v2-shell .quality-workspace { gap: 16px; }

.v2-shell .workspace-heading,
.v2-shell .section-heading,
.v2-shell .compact-heading { margin-bottom: 16px; }

.v2-shell .workspace-heading h2,
.v2-shell .section-heading h2,
.v2-shell .compact-heading h2 { letter-spacing: -.025em; }

.v2-shell .section-label { color: #567edb; letter-spacing: .11em; }
.v2-shell .muted { color: var(--muted); }

.v2-shell .panel,
.v2-shell .success,
.v2-shell .production-summary article,
.v2-shell .quality-kpi,
.v2-shell .quality-chart-card,
.v2-shell .completion-ring-panel,
.v2-shell .my-file-card,
.v2-shell .my-files-dashboard article,
.v2-shell .salary-summary article {
  border-color: rgba(203, 214, 231, .84);
  border-radius: var(--v2-radius);
  background: rgba(255,255,255,.94);
  box-shadow: var(--v2-shadow-sm);
}

.v2-shell .panel { padding: clamp(17px, 1.6vw, 22px); }

.v2-shell .primary,
.v2-shell .secondary-button,
.v2-shell .copy-button,
.v2-shell .preview-action,
.v2-shell .batch-action,
.v2-shell .table-save,
.v2-shell button {
  border-radius: var(--v2-radius-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.v2-shell .primary {
  background: linear-gradient(135deg, #3974ef, #285fd5);
  box-shadow: 0 8px 18px rgba(45, 100, 220, .2);
}

.v2-shell .primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(45, 100, 220, .26); }
.v2-shell .secondary-button:hover:not(:disabled),
.v2-shell .copy-button:hover,
.v2-shell .preview-action:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(36, 75, 150, .08); }

.v2-shell input:not([type="checkbox"]):not([type="radio"]),
.v2-shell select,
.v2-shell textarea {
  border-color: #ced8e8;
  border-radius: 11px;
  background: rgba(255,255,255,.96);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.v2-shell input:not([type="checkbox"]):not([type="radio"]):focus,
.v2-shell select:focus,
.v2-shell textarea:focus {
  outline: none;
  border-color: #6d96ef;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(58, 111, 230, .12);
}

.v2-shell .dropzone {
  border-color: #a9bee9;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(247,250,255,.96), rgba(239,244,255,.8));
}
.v2-shell .dropzone:hover,
.v2-shell .dropzone.is-dragging { border-color: #5e8bec; background: #f0f5ff; box-shadow: 0 10px 26px rgba(48, 92, 184, .08); }

.v2-shell .summary-grid article,
.v2-shell .status-summary,
.v2-shell .production-summary article,
.v2-shell .quality-kpi { min-height: 82px; }

.v2-shell .production-summary strong,
.v2-shell .quality-kpi strong,
.v2-shell .my-files-dashboard strong,
.v2-shell .salary-summary strong { letter-spacing: -.035em; }

.v2-shell .table-wrap,
.v2-shell .production-table-wrap,
.v2-shell .admin-table-wrap,
.v2-shell .quality-table-wrap {
  border: 1px solid #e1e7f0;
  border-radius: 13px;
  background: white;
}

.v2-shell table thead th,
.v2-shell .production-table th,
.v2-shell .admin-table th,
.v2-shell .quality-table th {
  background: #f6f8fc;
  color: #5d6b82;
  font-weight: 800;
  letter-spacing: .02em;
}

.v2-shell table tbody tr { transition: background .14s ease; }
.v2-shell table tbody tr:hover td { background: #edf4ff; }

.v2-shell .production-status,
.v2-shell .status-pill,
.v2-shell .print-badge,
.v2-shell .role-badge,
.v2-shell .quality-result { font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.36); }

.v2-shell .order-detail-drawer,
.v2-shell .document-preview-drawer {
  border-left: 1px solid rgba(202, 213, 230, .86);
  background: rgba(255,255,255,.97);
  box-shadow: -24px 0 60px rgba(20, 38, 69, .16);
  backdrop-filter: blur(18px);
}

.v2-shell .drawer-backdrop { background: rgba(14, 28, 51, .46); backdrop-filter: blur(3px); }

.v2-shell .admin-subnav {
  margin: 4px 0 7px 18px;
  border-left: 1px solid rgba(139, 168, 224, .22);
  padding: 3px 0 3px 12px;
}

.v2-shell .admin-subnav a { min-height: 34px; border-radius: 9px; color: #91a3bf; }
.v2-shell .admin-subnav a.active { background: rgba(79, 117, 190, .24); color: white; }

.v2-shell .hub-toast {
  border-color: rgba(174, 190, 218, .58);
  border-radius: 15px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 48px rgba(24, 42, 76, .18);
}

.v2-shell .completion-ring::before { box-shadow: inset 0 0 0 1px #e9edf4; }

/* Preserve the approved V1 login composition while bringing it into the V2 system. */
.v2-shell.is-login-view {
  background:
    radial-gradient(circle at 76% 18%, rgba(88, 111, 255, .23), transparent 31%),
    radial-gradient(circle at 12% 86%, rgba(63, 202, 190, .12), transparent 27%),
    linear-gradient(135deg, #e9eef8 0%, #f8faff 48%, #e7edfc 100%);
}

.v2-shell.is-login-view .staff-login-panel {
  border-color: rgba(255,255,255,.94);
  background: rgba(255,255,255,.76);
  box-shadow: 0 36px 110px rgba(28, 48, 88, .2);
}

.v2-shell.is-login-view .staff-login-panel::before {
  background:
    radial-gradient(circle at 36% 26%, rgba(255,255,255,.98), transparent 18%),
    radial-gradient(circle at 72% 70%, rgba(76, 98, 255, .68), transparent 35%),
    linear-gradient(145deg, rgba(241,244,255,.88), rgba(139,157,255,.4));
}

.v2-shell.is-login-view .staff-login-panel h2 { color: #15223a; }
.v2-shell.is-login-view .staff-login-form input { border-color: #cad6e9; background: rgba(255,255,255,.86); }

@media (max-width: 1100px) {
  .v2-shell .hub-sidebar { width: 210px; }
  .v2-shell .hub-content { margin-left: 210px; }
  .v2-shell .hub-nav > a { padding-left: 31px; }
  .v2-shell .hub-nav > a::before { left: 13px; }
}

@media (max-width: 900px) {
  .v2-shell .hub-sidebar { width: 100%; box-shadow: none; }
  .v2-shell .hub-content { margin-left: 0; }
  .v2-shell main { width: calc(100% - 24px); }
  .v2-shell .topbar { padding: 13px 16px; }
  .v2-shell.is-login-view main { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.v2-shell :focus-visible {
  outline: 3px solid rgba(73, 123, 231, .42);
  outline-offset: 2px;
}

/* V2.2 · compact density, fluid dashboards and clearer interaction states */
body.v2-shell:not(.is-login-view) { font-size: 13px; }

.v2-shell .analytics-kpi-panel article,
.v2-shell .production-summary article,
.v2-shell .quality-kpi,
.v2-shell .my-files-dashboard article,
.v2-shell .salary-summary article {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 4%, rgba(94, 137, 244, .2), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(244,248,255,.95));
}

.v2-shell .analytics-kpi-panel article::after,
.v2-shell .production-summary article::after,
.v2-shell .quality-kpi::after,
.v2-shell .my-files-dashboard article::after,
.v2-shell .salary-summary article::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -24px;
  bottom: -30px;
  width: 84px;
  height: 84px;
  border-radius: 45% 55% 62% 38%;
  background: rgba(80, 124, 238, .12);
  filter: blur(2px);
  transform: rotate(18deg);
}

.v2-shell .analytics-kpi-panel article:nth-child(2n),
.v2-shell .production-summary article:nth-child(2n),
.v2-shell .quality-kpi:nth-child(2n) {
  background:
    radial-gradient(circle at 92% 4%, rgba(49, 191, 159, .17), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(243,251,248,.95));
}

.v2-shell .quality-table th,
.v2-shell .quality-table td { vertical-align: middle; line-height: 1.45; }
.v2-shell .quality-deduction-note { white-space: normal; }
.v2-shell .quality-row-pending-review td { background: rgba(255, 249, 247, .72); }
.v2-shell .quality-detail-button { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.v2-shell .quality-review-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e34942;
  box-shadow: 0 0 0 4px rgba(227, 73, 66, .12);
}
.v2-shell .quality-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-shell .quality-review-heading h3 { margin: 0; }
.v2-shell .quality-review-status { border-radius: 10px; padding: 10px 12px; line-height: 1.55; }
.v2-shell .quality-review-status.pending { border: 1px solid #f1c2bd; background: #fff2f0; color: #a7322c; }
.v2-shell .quality-review-status.resolved { border: 1px solid #a7d9c1; background: #ebf8f2; color: #176f4c; }
.v2-shell .quality-review-actions { margin-top: 10px; border-radius: 12px; background: #f5f8fd; padding: 10px; }

.v2-shell .hub-toast { border-left-width: 4px; }
.v2-shell .hub-toast.hub-toast-success {
  border-color: #9bd5ba;
  border-left-color: #1d9868;
  background: linear-gradient(120deg, rgba(239,251,246,.97), rgba(255,255,255,.95));
}
.v2-shell .hub-toast.hub-toast-success strong { color: #146b49; }
.v2-shell .hub-toast.hub-toast-error {
  border-color: #efb5ae;
  border-left-color: #d6423a;
  background: linear-gradient(120deg, rgba(255,240,238,.97), rgba(255,255,255,.95));
}
.v2-shell .hub-toast.hub-toast-error strong { color: #a52e28; }
.v2-shell .hub-toast.hub-toast-warning {
  border-color: #ecd39d;
  border-left-color: #c07a12;
  background: linear-gradient(120deg, rgba(255,248,229,.97), rgba(255,255,255,.95));
}

.v2-shell .order-link { display: inline-flex; align-items: center; gap: 7px; }
.v2-shell .order-link .urgent-dot { margin: 0; order: 2; }

.v2-shell .production-store-picker > summary {
  position: relative;
  min-height: 40px;
  padding: 8px 34px 8px 11px;
  font-size: 13px;
  font-weight: 700;
}
.v2-shell .production-store-picker > summary::after {
  content: "";
  position: absolute;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #74839b;
  border-bottom: 2px solid #74839b;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}
.v2-shell .production-store-picker[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.v2-shell .production-store-picker > div { min-width: 270px; padding: 7px; }
.v2-shell .production-store-picker label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px;
  color: #33425c;
  font-size: 13px;
  line-height: 1.35;
}
.v2-shell .production-store-picker label:hover { background: #eef4ff; }
.v2-shell .production-store-picker label input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.v2-shell .production-store-picker label span { min-width: 0; overflow-wrap: anywhere; }

/* Production query gains a deliberate, readable phone layout instead of a squeezed desktop table. */
@media (max-width: 900px) {
  .production-page .hub-sidebar { display: none; }
  .production-page .hub-content { width: 100%; margin-left: 0; }
  .production-page .topbar { position: sticky; top: 0; z-index: 30; min-height: 62px; padding: 9px 13px; }
  .production-page .topbar h1 { font-size: 21px; }
  .production-page .topbar .eyebrow,
  .production-page .local-badge { display: none; }
  .production-page .staff-identity { max-width: 116px; font-size: 11px; }
  .production-page main { width: calc(100% - 20px); margin-top: 12px; }
  .production-page .production-workspace { gap: 12px; }
  .production-page .production-period-toolbar { gap: 9px; border-radius: 14px; background: white; padding: 14px; box-shadow: var(--v2-shadow-sm); }
  .production-page .production-period-toolbar > div { grid-column: 1 / -1; }
  .production-page .production-period-toolbar label {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .production-page .production-period-toolbar input[type="date"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 7px;
    font-size: 14px;
  }
  .production-page .analytics-kpi-panel { grid-template-columns: 1fr 1fr; }
  .production-page .analytics-kpi-panel article { min-height: 88px; padding: 12px; }
  .production-page .analytics-chart-panel { overflow: hidden; padding: 13px; }
  .production-page .trend-canvas-wrap { overflow: hidden; padding-bottom: 0; }
  .production-page .analytics-chart-panel canvas { width: 100% !important; max-width: 100%; height: 178px; }
  .production-page .completion-ring-panel { padding: 13px; }
  .production-page .completion-ring-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    align-items: start;
    gap: 8px 4px;
    overflow: visible;
    padding-bottom: 0;
  }
  .production-page .completion-ring-item {
    min-width: 0;
    min-height: 116px;
    grid-template-rows: 66px 20px 18px;
    align-content: start;
    justify-items: center;
    gap: 4px;
    padding: 0 1px;
  }
  .production-page .completion-ring { width: 64px; height: 64px; }
  .production-page .completion-ring::before { width: 49px; height: 49px; }
  .production-page .completion-ring-item strong,
  .production-page .completion-ring-item small { min-height: 18px; line-height: 18px; white-space: nowrap; }
  .production-page .ranking-layout { grid-template-columns: 1fr; gap: 10px; }
  .production-page .ranking-layout article { padding: 13px; }
  .production-page .production-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .production-page .production-summary article { min-height: 76px; padding: 11px; }
  .production-page .production-order-panel { padding: 13px; }
  .production-page .production-order-panel > .section-heading { margin: -13px -13px 10px; padding: 12px 13px 10px; }
  .production-page .production-filters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .production-page .production-filters textarea,
  .production-page .production-store-picker { grid-column: 1 / -1; }
  .production-page .production-store-picker > div { right: auto; left: 0; width: 100%; min-width: 0; }
}

@media (max-width: 760px) {
  .production-page .production-table-wrap { max-height: none; overflow: visible; border: 0; background: transparent; }
  .production-page .production-table { display: block; width: 100%; min-width: 0; }
  .production-page .production-table thead { display: none; }
  .production-page .production-table tbody { display: grid; gap: 10px; }
  .production-page .production-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid #dce5f2;
    border-radius: 13px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 7px 18px rgba(28, 49, 85, .06);
  }
  .production-page .production-table td {
    display: grid;
    min-width: 0;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    border: 0;
    border-top: 1px solid #eef2f7;
    padding: 8px 10px;
    background: transparent !important;
    overflow-wrap: anywhere;
  }
  .production-page .production-table td::before {
    content: attr(data-label);
    color: #77849a;
    font-size: 10px;
    font-weight: 800;
  }
  .production-page .production-table td:first-child {
    grid-column: 1 / -1;
    border-top: 0;
    background: linear-gradient(90deg, #f2f6ff, #fbfdff) !important;
    padding-block: 11px;
  }
  .production-page .production-table td:nth-child(2),
  .production-page .production-table td:nth-child(4),
  .production-page .production-table td:nth-child(6),
  .production-page .production-table td:nth-child(8),
  .production-page .production-table td:nth-child(10) { border-left: 1px solid #eef2f7; }
  .production-page .production-table-total { text-align: left; }
}

@media (max-width: 520px) {
  .production-page .production-period-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-page .production-period-toolbar .primary { grid-column: 1 / -1; }
  .production-page .production-filters { grid-template-columns: 1fr; }
  .production-page .production-filters > * { grid-column: 1 / -1; }
  .production-page .production-table tr { grid-template-columns: 1fr; }
  .production-page .production-table td:nth-child(n) { border-left: 0; }
}

/* V2 — order interception and non-destructive void workflow. */
.production-page .production-summary {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.status-summary.blocked,
.production-status.blocked {
  border-color: #f4bd7a;
  background: #fff4e8;
  color: #a84a00;
}

.status-summary.voided,
.production-status.voided {
  border-color: #cbd2dc;
  background: #eef1f5;
  color: #536174;
}

.status-summary.clickable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.status-summary.clickable:hover,.status-summary.clickable:focus-visible { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(38,65,118,.13); outline: 2px solid rgba(36,94,234,.18); }
.status-summary.pending-assignment,.production-status.pending_assignment { border-color: #9dc4ff; background: #eef5ff; color: #1f5fbf; }
.status-summary.external-production,.production-status.external_production { border-color: #b9a7eb; background: #f5f1ff; color: #6842b8; }
.production-status.external_cancelled { border-color: #cbd2dc; background: #f3f5f8; color: #4b586b; }
.external-analysis-panel { margin-top: 14px; }
.external-analysis-panel > .section-heading > span { color: var(--text-muted); font-size: 12px; }
.salary-records td small { display: block; color: var(--text-muted); margin-top: 3px; }

.order-workflow-banner {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 14px;
}

.order-workflow-banner strong { font-size: 15px; }
.order-workflow-banner span { font-size: 12px; opacity: .8; }
.order-workflow-banner p { margin: 2px 0 0; }
.order-workflow-banner.blocked { border-color: #f4bd7a; background: #fff7ec; color: #8f4200; }
.order-workflow-banner.voided { border-color: #cbd2dc; background: #f3f5f8; color: #4b586b; }

.order-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 12px 0 16px;
}

.order-workflow-actions button {
  border: 1px solid #efb35e;
  border-radius: 10px;
  background: #fff6e7;
  color: #8f4200;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.order-workflow-actions button.release { border-color: #8dd7b3; background: #edfaf3; color: #14764a; }
.order-workflow-actions button.danger { border-color: #f2aaa2; background: #fff0ef; color: #b42318; }
.order-workflow-actions button:disabled { opacity: .55; cursor: wait; }
.order-workflow-actions span { color: #718096; font-size: 12px; }

.order-workflow-history { margin-top: 18px; }
.order-workflow-history > h3 { margin: 0 0 10px; }
.order-workflow-history > article {
  border-left: 3px solid #9bacbf;
  border-radius: 0 10px 10px 0;
  background: #f7f9fc;
  padding: 11px 13px;
  margin-bottom: 9px;
}
.order-workflow-history article > div { display: flex; justify-content: space-between; gap: 12px; }
.order-workflow-history article span,
.order-workflow-history article p { color: #718096; font-size: 12px; }
.order-workflow-history article p { margin: 5px 0; }
.order-workflow-history blockquote {
  margin: 6px 0 0;
  padding-left: 10px;
  border-left: 2px solid #d2dae5;
  color: #344054;
}

@media (max-width: 760px) {
  .production-page .production-summary { grid-template-columns: 1fr 1fr; }
  .order-workflow-history article > div { align-items: flex-start; flex-direction: column; gap: 2px; }
}

/* V2 — shared color language for the production-detail drawer. */
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).pending_print,
.drawer-task.status-pending_print { --detail-status: #7147c7; --detail-status-bg: #f3efff; --detail-status-border: #d8caf8; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).pending_claim,
.drawer-task.status-pending_claim { --detail-status: #1769d2; --detail-status-bg: #edf5ff; --detail-status-border: #bfdbfa; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).blocked,
.drawer-task.status-blocked { --detail-status: #b54708; --detail-status-bg: #fff4e8; --detail-status-border: #f6c88f; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).in_progress,
.drawer-task.status-in_progress { --detail-status: #9a6700; --detail-status-bg: #fff8e5; --detail-status-border: #edd18b; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).qc_rework,
.drawer-task.status-qc_rework { --detail-status: #b42318; --detail-status-bg: #fff0ef; --detail-status-border: #f2b5af; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).qc_review,
.drawer-task.status-qc_review { --detail-status: #996100; --detail-status-bg: #fff7df; --detail-status-border: #efd18a; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).completed,
.drawer-task.status-completed { --detail-status: #177a4d; --detail-status-bg: #edf9f3; --detail-status-border: #a8dfc5; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).voided,
.drawer-task.status-voided { --detail-status: #536174; --detail-status-bg: #eef1f5; --detail-status-border: #cbd2dc; }
:is(.drawer-status-banner, .order-status-overview, .drawer-task-status).neutral,
.drawer-task.status-neutral { --detail-status: #536174; --detail-status-bg: #f3f5f8; --detail-status-border: #d7dde6; }

.drawer-status-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  border: 1px solid var(--detail-status-border);
  border-radius: 12px;
  background: linear-gradient(115deg, var(--detail-status-bg), rgba(255,255,255,.94));
  padding: 12px 14px;
  color: var(--detail-status);
}

.drawer-status-dot,
.order-status-overview i,
.drawer-task-status i {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.drawer-status-dot { width: 10px; height: 10px; }
.drawer-status-banner div { display: grid; gap: 2px; }
.drawer-status-banner strong { font-size: 14px; }
.drawer-status-banner p { margin: 0; color: color-mix(in srgb, var(--detail-status) 74%, #556176); font-size: 12px; }

.order-status-overview {
  border: 1px solid var(--detail-status-border);
  background: var(--detail-status-bg) !important;
}

.order-status-overview strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--detail-status);
}

.drawer-task {
  border-color: var(--detail-status-border, var(--line));
  background: linear-gradient(100deg, var(--detail-status-bg, #fff) 0, #fff 36%);
  box-shadow: inset 4px 0 0 var(--detail-status, transparent);
}

.drawer-task-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--detail-status-border);
  border-radius: 999px;
  background: var(--detail-status-bg);
  padding: 3px 8px;
  color: var(--detail-status);
  font-size: 11px;
  font-weight: 800;
}

.drawer-task-status i { width: 6px; height: 6px; box-shadow: none; }

.drawer-status-reason {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 10px 0 0;
  border-left: 3px solid;
  border-radius: 0 10px 10px 0;
  padding: 10px 12px;
  font-size: 12px;
}

.drawer-status-reason strong { grid-row: 1 / 3; }
.drawer-status-reason span { color: #758196; }
.drawer-status-reason.blocked { border-color: #e99b42; background: #fff8ed; color: #8f4200; }
.drawer-status-reason.voided { border-color: #94a0b0; background: #f3f5f8; color: #475467; }

@media (max-width: 520px) {
  .drawer-status-reason { grid-template-columns: 1fr; }
  .drawer-status-reason strong { grid-row: auto; }
}
