:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --line: #d9e1e8;
  --text: #1f2933;
  --muted: #66737f;
  --blue: #246bfe;
  --green: #0f9f6e;
  --amber: #c98205;
  --red: #ca3a31;
  --cyan: #0b87a3;
  --shadow: 0 18px 48px rgba(31, 41, 51, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.is-warehouse-modal-open { overflow: hidden; }

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2f5;
}

body.is-authenticated .login-screen { display: none; }
body:not(.is-authenticated) .app-shell { visibility: hidden; }

.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h1 { margin: 18px 0 8px; font-size: 24px; }
.login-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }
.login-card label { display: grid; gap: 7px; color: #40505d; font-size: 13px; font-weight: 650; }
.login-card input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cfd9e1; border-radius: 7px; }
.login-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: #182430; color: #fff; font-weight: 800; }
.login-code-row { display: grid; grid-template-columns: 1fr 112px; align-items: end; gap: 10px; margin-top: 16px; }
.login-code-row button, .login-submit { height: 42px; border: 0; border-radius: 7px; cursor: pointer; font-weight: 700; }
.login-code-row button { background: #e8eef4; color: #304252; }
.login-submit { width: 100%; margin-top: 20px; background: var(--blue); color: #fff; }
.login-card button:disabled { cursor: wait; opacity: .6; }
.login-message { min-height: 22px; margin: 12px 0 0 !important; color: var(--red) !important; }
.session-user { position: relative; display: flex; align-items: center; }
.session-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.9));
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.session-avatar:hover,
.session-avatar[aria-expanded="true"] {
  border-color: rgba(36, 107, 254, 0.28);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 4px 14px rgba(36, 107, 254, 0.14);
}
.session-avatar:active { transform: scale(0.94); }
.session-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 138px;
  padding: 8px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 14px 36px rgba(31, 41, 51, 0.14), inset 0 1px rgba(255, 255, 255, 0.72);
}
.session-menu[hidden] { display: none; }
.session-menu strong {
  display: block;
  padding: 6px 8px 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}
.session-menu button {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ca3a31;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}
.session-menu button:hover { background: rgba(202, 58, 49, 0.08); }

button, input, table { font: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

body.is-floating-window .sidebar {
  padding-top: 18px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 66px 16px 22px;
  background: #182430;
  color: #edf4f8;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #e7fbf3;
  color: #0c7052;
  border-radius: 8px;
  font-weight: 800;
}

.brand-title {
  font-size: 16px;
  font-weight: 750;
}

.brand-subtitle {
  margin-top: 2px;
  color: #a9b7c2;
  font-size: 12px;
}

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

.nav-item {
  border: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  background: transparent;
  color: #bfccd6;
  cursor: pointer;
  text-align: left;
}

.nav-item.is-active,
.nav-item:hover {
  background: #263747;
  color: #ffffff;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #9fd2ff;
  font-weight: 800;
  position: relative;
  flex: none;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.nav-icon-home::before {
  width: 14px;
  height: 12px;
  left: 4px;
  top: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.nav-icon-home::after {
  width: 12px;
  height: 12px;
  left: 5px;
  top: 4px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.nav-icon-camera::before {
  width: 17px;
  height: 13px;
  left: 3px;
  top: 7px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon-camera::after {
  width: 6px;
  height: 6px;
  left: 8px;
  top: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: -3px -8px 0 -2px currentColor;
}

.nav-icon-doc::before {
  width: 14px;
  height: 17px;
  left: 5px;
  top: 3px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon-doc::after {
  width: 7px;
  height: 7px;
  right: 3px;
  top: 3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: transparent;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  background: #22313f;
  border-radius: 8px;
}

.mini-label {
  font-size: 12px;
  color: #a9b7c2;
}

.refresh-pill {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f7ff;
  color: #075a73;
  font-weight: 700;
}

.main {
  padding: 24px;
  min-width: 0;
}

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

h1, h2, p { margin: 0; }

h1 {
  font-size: 24px;
  line-height: 1.25;
}

.topbar p,
.panel-header p,
.metric-note {
  color: var(--muted);
}

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

.sku-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sku-search input {
  width: 190px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 650;
}

.sku-search input::placeholder {
  color: #9aa6b2;
}

.status-line {
  min-width: 220px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
}

.refresh-countdown {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.refresh-countdown strong {
  color: #0d7353;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 21px;
}

.refresh-button {
  display: grid;
  place-items: center;
}

.refresh-icon {
  display: block;
  line-height: 1;
}

.mini-toggle {
  display: none;
}

body.is-floating-window .mini-toggle {
  display: inline-grid;
  place-items: center;
}

.action-button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: #203040;
  font-weight: 760;
  cursor: pointer;
}

.action-button:hover,
.icon-button:hover {
  border-color: #adc6e6;
  background: #f7fbff;
}

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

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.05);
}

.summary-item span {
  color: #44515d;
  font-size: 15px;
  font-weight: 700;
}

.summary-item strong {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  background: #e8f2ff;
  color: #2e8df4;
  font-size: 26px;
  line-height: 1;
}

.mini-toggle,
.mini-expand {
  position: relative;
}

.mini-icon,
.view-switch-icon {
  position: relative;
  display: block;
  width: 19px;
  height: 19px;
  margin: auto;
}

.mini-icon::before,
.mini-icon::after,
.view-switch-icon::before,
.view-switch-icon::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.mini-icon::before {
  width: 12px;
  height: 12px;
  left: 1px;
  top: 1px;
}

.mini-icon::after {
  width: 12px;
  height: 9px;
  right: 0;
  bottom: 1px;
  background: var(--surface);
}

.view-switch-icon::before {
  width: 14px;
  height: 10px;
  left: 1px;
  top: 2px;
}

.view-switch-icon::after {
  width: 10px;
  height: 8px;
  right: 1px;
  bottom: 2px;
  background: #203040;
}

.refresh-button.is-loading .refresh-icon {
  animation: spin 0.9s linear infinite;
}

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

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(138px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.overview-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.overview-module {
  min-height: 278px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.module-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.module-link {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #cbd9e6;
  border-radius: 7px;
  background: #f7fbff;
  color: #173f77;
  font-weight: 760;
  cursor: pointer;
}

.module-link:hover {
  border-color: #9fbce0;
  background: #eef6ff;
}

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

.shooting-module .module-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.module-kpi {
  min-height: 86px;
  padding: 13px;
  border: 1px solid #dce5ed;
  border-radius: 8px;
  background: #f8fbfd;
}

.shooting-module .module-kpi {
  min-width: 0;
}

.module-kpi.primary {
  background: #eaf3ff;
  border-color: #c7dcff;
}

.module-kpi.danger {
  background: #fff1ef;
  border-color: #ffd3ce;
}

.module-kpi.warning {
  background: #fff7e7;
  border-color: #f4ddb5;
}

.module-kpi span {
  display: block;
  color: #5d6c79;
  font-size: 13px;
  font-weight: 720;
}

.module-kpi strong {
  display: block;
  margin-top: 9px;
  color: #173f77;
  font-size: 34px;
  line-height: 1;
}

.docs-module .module-kpi strong {
  color: #203040;
}

.module-kpi.danger strong {
  color: var(--red);
}

.module-kpi.warning strong {
  color: var(--amber);
}

.module-foot {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #f7fafc;
}

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

.module-breakdown div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #fbfdff;
}

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

.module-breakdown strong {
  color: #243648;
  font-size: 14px;
  white-space: nowrap;
}

.module-foot span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.module-foot strong {
  color: #182430;
  font-size: 18px;
}

.overview-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.overview-detail-panel {
  min-height: 430px;
}

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

.detail-summary-grid div,
.detail-filter-card {
  min-height: 62px;
  padding: 10px;
  border: 1px solid #dfe8f0;
  border-radius: 8px;
  background: #f8fbfd;
}

.detail-filter-card {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.detail-filter-card:hover {
  border-color: #b9cbe2;
  background: #f1f7ff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.detail-filter-card.is-active {
  border-color: #86b7ff;
  background: #edf5ff;
  box-shadow: inset 0 0 0 1px #86b7ff, var(--shadow-soft);
}

.detail-summary-grid span,
.detail-summary-grid strong {
  display: block;
}

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

.detail-summary-grid strong {
  margin-top: 7px;
  color: #173f77;
  font-size: 20px;
  line-height: 1;
}

.docs-detail-summary > :first-child {
  background: #fff1ef;
  border-color: #ffd3ce;
}

.docs-detail-summary > :first-child strong {
  color: var(--red);
}

.overview-list {
  display: grid;
  gap: 8px;
  max-height: 468px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.overview-list::-webkit-scrollbar {
  width: 10px;
}

.overview-list::-webkit-scrollbar-track {
  background: #eef3f8;
  border-radius: 999px;
}

.overview-list::-webkit-scrollbar-thumb {
  background: #b8c7d8;
  border: 2px solid #eef3f8;
  border-radius: 999px;
}

.overview-list::-webkit-scrollbar-thumb:hover {
  background: #91a7bd;
}

.overview-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 168px 44px;
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #fff;
}

.overview-doc-row {
  grid-template-columns: 74px minmax(0, 1fr) 84px 44px;
}

.sku-thumb {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  border: 1px solid #dbe4ea;
  border-radius: 7px;
  background: #f4f7fa;
}

.sku-thumb-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  z-index: 1;
}

.sku-thumb-button:focus-visible {
  outline: 2px solid #246bfe;
  outline-offset: 2px;
}

.sku-thumb-empty {
  display: grid;
  place-items: center;
  color: #8a98a5;
  font-size: 11px;
  font-weight: 700;
}

.overview-row > div {
  min-width: 0;
}

.overview-row strong,
.overview-row em {
  display: block;
}

.sku-media {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.sku-media .status-chip {
  min-width: 58px;
  justify-content: center;
}

.row-actions {
  width: 168px;
  justify-self: end;
  position: relative;
  display: grid;
  gap: 6px;
}

.photo-status-trigger {
  width: 168px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border: 1px solid #c8d7ea;
  border-radius: 7px;
  background: #fff;
  color: #172536;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  list-style: none;
}

.photo-status-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #172536;
}

.photo-status-trigger.is-active::after {
  transform: rotate(180deg);
}

.photo-status-popover {
  position: fixed;
  right: auto;
  top: 0;
  left: 0;
  width: 260px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #c8d7ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  z-index: 90;
}

.photo-status-popover:not(.is-visible) {
  display: none;
}

.notice-modal,
.confirm-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
}

.notice-modal.is-visible,
.confirm-modal.is-visible { display: flex; }
.notice-modal { z-index: 140; }
.confirm-modal { z-index: 140; }

.notice-modal-card {
  width: min(320px, 100%);
  padding: 28px 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.notice-modal-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 50%;
  background: #fff3d6;
  color: #b7791f;
  font-size: 20px;
  font-weight: 800;
}

.notice-modal-card h2 {
  margin: 0 0 8px;
  color: #182230;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.notice-modal-card p {
  margin: 0;
  color: #647386;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.notice-modal-card button {
  display: block;
  width: 100%;
  margin: 22px 0 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.notice-modal-card button:hover { background: #1d4ed8; }
.notice-modal-card button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.3); outline-offset: 2px; }

.confirm-modal-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.confirm-modal-card h2 {
  margin: 0 0 8px;
  color: #182230;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.2px;
}

.confirm-modal-card p {
  margin: 0;
  color: #52616f;
  font-size: 14px;
  line-height: 1.55;
}

.confirm-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 24px;
}

.confirm-modal-actions button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.confirm-modal-cancel {
  border: 1px solid #d9e1ea;
  background: #ffffff;
  color: #52616f;
}

.confirm-modal-submit {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.confirm-modal-actions button:active { transform: scale(0.98); }
.confirm-modal-submit:hover { background: #1d4ed8; }
.confirm-modal-cancel:hover { background: #f6f8fb; }
.confirm-modal-actions button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.3); outline-offset: 2px; }

@media (prefers-reduced-transparency: reduce) {
  .notice-modal-card,
  .confirm-modal-card { background: #ffffff; }
}

.row-action {
  display: grid;
  grid-template-columns: 62px 178px;
  align-items: center;
  gap: 5px;
}

.row-action span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.row-action select {
  display: block;
  width: 178px !important;
  min-width: 0;
  max-width: 178px !important;
  height: 28px;
  padding: 0 14px 0 6px;
  border: 1px solid #c8d7ea;
  border-radius: 7px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #172536 50%) right 8px center / 5px 5px no-repeat,
    linear-gradient(135deg, #172536 50%, transparent 50%) right 5px center / 5px 5px no-repeat,
    #fff;
  color: #172536;
  font-size: 12px;
  font-weight: 700;
}

.photo-status-save {
  height: 28px;
  border: 1px solid #9bdcbf;
  border-radius: 7px;
  background: #ecfdf5;
  color: #087050;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.photo-status-save:disabled,
.photo-status-trigger[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
}

.doc-actions {
  display: grid;
  grid-template-columns: repeat(2, 80px);
  gap: 5px;
}

.doc-actions .row-link-button {
  width: 80px;
}

.doc-actions .warehouse-image-button {
  grid-column: 1 / -1;
  width: 100%;
}

.row-action-button,
.row-link-button {
  height: 26px;
  padding: 0 6px;
  border: 1px solid #bad0ee;
  border-radius: 7px;
  background: #f6fbff;
  color: #1667c7;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

.row-action-button.is-sent {
  background: #ecfdf5;
  border-color: #9bdcbf;
  color: #087050;
}

.row-action-button:disabled,
.row-link-button:disabled,
.row-action select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.row-action-placeholder {
  color: #9aa7b3;
  font-size: 12px;
}

.warehouse-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.warehouse-modal.is-visible { display: flex; }

.warehouse-modal-card {
  width: min(980px, 100%);
  max-height: min(760px, 88vh);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.warehouse-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.warehouse-modal-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.warehouse-modal-header h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 750;
}

.warehouse-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.warehouse-modal-body {
  max-height: calc(min(760px, 88vh) - 86px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 20px;
}

.warehouse-image-table { display: grid; gap: 8px; min-width: 700px; }

.warehouse-image-row {
  display: grid;
  grid-template-columns: 132px 130px minmax(160px, 1fr) 100px 150px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  color: #475569;
  font-size: 12px;
}

.warehouse-image-header {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.warehouse-image-preview {
  width: 112px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  cursor: zoom-in;
}

.warehouse-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.warehouse-loading,
.warehouse-empty-state {
  padding: 56px 20px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

.sku-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.label-sku-line,
.sku-with-transport {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  vertical-align: middle;
  flex-wrap: wrap;
  color: #172536;
  font-size: 14px;
  font-weight: 820;
  line-height: 1.32;
}

.sku-with-transport strong {
  min-width: 0;
  color: inherit;
  font: inherit;
}

.overview-row div span.label-sku-line,
.overview-row div span.sku-with-transport {
  margin-top: 0;
  color: #172536;
  font-size: 14px;
  font-weight: 820;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

#overviewReadyList .label-sku-line {
  display: grid;
  grid-template-columns: minmax(0, 210px) 56px;
  align-items: center;
  gap: 4px;
}

#overviewReadyList .label-sku-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

#overviewReadyList .label-sku-line > .transport-icon {
  width: 56px;
  justify-content: flex-start;
}

.transport-icon {
  flex: none;
  width: 38px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f91ff;
}

.transport-sea-air {
  width: 56px;
  gap: 2px;
}

.transport-icon svg {
  width: 38px;
  height: 26px;
  display: block;
  fill: none;
  stroke: #2f91ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-sea-air svg {
  width: 27px;
  height: 22px;
}

.sku-cell.has-thumb strong {
  min-width: 0;
}

.overview-row div strong {
  color: #172536;
  font-size: 14px;
  font-weight: 820;
}

.overview-row div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-row em {
  color: #52616f;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  text-align: right;
}

.metric {
  min-height: 124px;
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.metric-primary {
  background: #eaf3ff;
  border-color: #c7dcff;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 36px;
  line-height: 1;
  font-weight: 820;
}

.metric-value.warning { color: var(--amber); }
.metric-value.light { color: #7a8b12; }
.metric-value.danger { color: var(--red); }
.metric-value.air { color: var(--cyan); }
.metric-value.calm { color: var(--green); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

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

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

h2 {
  font-size: 16px;
  line-height: 1.3;
}

.badge {
  min-width: 66px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf7f1;
  color: #0d7454;
  font-weight: 750;
}

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

.risk-lane {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}

.lane-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 10px;
}

.lane-title span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
}

.serious-lane .lane-title span { background: var(--red); }
.overdue-lane .lane-title span { background: #d35a24; }
.warning-lane .lane-title span { background: var(--amber); }
.light-lane .lane-title span { background: #98a51c; }

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

.risk-item,
.empty-state {
  border: 1px solid #dbe4ea;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.risk-item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-weight: 760;
  line-height: 1.25;
}

.risk-item-meta {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.risk-item-sku {
  display: block;
  color: #172536;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 32px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e7edf2;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #246bfe, #0f9f6e);
}

.shoot-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.shoot-card {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.shoot-card span,
.shoot-card em {
  display: block;
}

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

.shoot-card strong {
  display: block;
  margin-top: 6px;
  color: #173f77;
  font-size: 30px;
  line-height: 1;
}

.shoot-card em {
  margin-top: 8px;
  color: #66737f;
  font-size: 12px;
  font-style: normal;
}

.table-panel {
  margin-bottom: 14px;
}

.table-header {
  align-items: center;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2f6;
}

.segment {
  border: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segment.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(31, 41, 51, 0.12);
}

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

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #f7fafc;
  color: #52616f;
  font-weight: 760;
}

tbody tr:hover {
  background: #f9fbfd;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 730;
  font-size: 12px;
}

.status-air { color: #075a73; background: #dff7fb; }
.status-serious { color: #8f1c16; background: #ffe5e2; }
.status-overdue { color: #8d3513; background: #ffe8db; }
.status-warning { color: #7b4b00; background: #fff1d2; }
.status-light { color: #60700b; background: #f2f6c9; }
.status-notDue { color: #0b6b4c; background: #e2f7ed; }
.status-notShipped { color: #4d5964; background: #edf1f4; }
.status-readyShipped { color: #0d5578; background: #dff2ff; }
.status-readyBackup { color: #5b4f6f; background: #eee9f7; }
.status-shootingProgress { color: #1d4ed8; background: #e8f1ff; }
.status-canShoot { color: #0b6b4c; background: #e2f7ed; }
.status-pendingUpload { color: #8d3513; background: #ffe8db; }

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

.system-grid div {
  padding: 12px;
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.system-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

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

.mini-player {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 30;
  width: min(360px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 22px;
  background: rgba(24, 36, 48, 0.88);
  color: #f7fbff;
  box-shadow: 0 28px 90px rgba(14, 22, 30, 0.36);
  backdrop-filter: blur(18px);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mini-player:not(.mini-player-floating) {
  pointer-events: none;
}

.mini-player:not(.mini-player-floating) * {
  pointer-events: none;
}

.mini-player:not(.mini-player-floating) .mini-expand {
  pointer-events: auto;
}

.mini-top,
.mini-brand,
.mini-main,
.mini-stats {
  display: flex;
  align-items: center;
}

.mini-top {
  justify-content: space-between;
  gap: 10px;
}

.mini-brand {
  gap: 10px;
  min-width: 0;
}

.mini-dot {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #dff8ed;
  position: relative;
}

.mini-dot::after {
  content: "PD";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0d7353;
  font-weight: 850;
  font-size: 13px;
}

.mini-title {
  font-weight: 800;
  white-space: nowrap;
}

.mini-subtitle,
.mini-detail,
.mini-stats span {
  color: rgba(247, 251, 255, 0.68);
  font-size: 12px;
}

.mini-expand {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  cursor: pointer;
}

.mini-carousel {
  position: relative;
  min-height: 144px;
  margin: 8px 0 10px;
}

.mini-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.mini-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mini-player:not(.mini-player-floating) .mini-slide.is-active {
  pointer-events: none;
}

.mini-main {
  gap: 12px;
  margin: 0 0 12px;
}

.mini-count {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #eaf3ff, #dff8ed);
  color: #12202c;
  font-size: 29px;
  font-weight: 900;
}

.mini-status {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.mini-detail {
  margin-top: 5px;
  line-height: 1.45;
}

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

.mini-stats div {
  min-width: 0;
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(255,255,255,0.10);
}

.mini-stats span,
.mini-stats strong {
  display: block;
}

.mini-stats strong {
  margin-top: 1px;
  font-size: 16px;
}

.mini-refresh {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #182430;
  font-weight: 780;
  cursor: pointer;
}

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

.mini-summary-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(201, 224, 247, 0.54);
  border-radius: 12px;
  background: rgba(247, 251, 255, 0.92);
  color: #344457;
}

.mini-summary-item span {
  min-width: 0;
  font-size: 13px;
  font-weight: 760;
}

.mini-summary-item strong {
  min-width: 54px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e7f0ff;
  color: #2f80ed;
  font-size: 22px;
  font-weight: 900;
}

.closed-state {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(135deg, #a9b8b1, #d8dde2);
}

.closed-card {
  width: min(420px, 100%);
  padding: 20px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 22px;
  background: rgba(24, 36, 48, 0.88);
  color: #fff;
  box-shadow: 0 28px 90px rgba(14, 22, 30, 0.36);
  backdrop-filter: blur(18px);
}

.closed-card p {
  margin-top: 5px;
  color: rgba(255,255,255,0.68);
}

.image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 20, 0.58);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  user-select: none;
  -webkit-user-select: none;
}

.image-preview-overlay.is-visible {
  display: flex;
}

.image-preview-frame {
  width: min(90vw, 1040px);
  max-height: 88vh;
  margin: 0;
  display: grid;
  gap: 12px;
  place-items: center;
  animation: image-preview-material-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-preview-frame img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 88px rgba(0, 0, 0, 0.42);
  -webkit-user-drag: none;
}

.image-preview-frame figcaption {
  min-height: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 600;
}

.image-preview-thumbnails {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  gap: 10px;
  max-width: min(90vw, 1040px);
  overflow-x: auto;
  padding: 4px 2px 2px;
  scrollbar-width: thin;
}

.image-preview-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  overflow: hidden;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.image-preview-thumb.is-active {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

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

.image-preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.image-preview-close:hover { background: rgba(255, 255, 255, 0.3); }
.image-preview-close:active { transform: scale(0.94); }
.image-preview-close:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.72); outline-offset: 3px; }

@keyframes image-preview-material-in {
  from { opacity: 0; transform: scale(0.96); filter: blur(3px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .image-preview-frame { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .image-preview-overlay { background: rgba(9, 15, 24, 0.9); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .image-preview-close { background: #263445; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.image-hover-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 70;
  display: none;
  width: 220px;
  height: 220px;
  padding: 8px;
  border: 1px solid rgba(154, 170, 188, 0.58);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.26);
  pointer-events: none;
}

.image-hover-preview.is-visible {
  display: block;
}

.image-hover-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 7px;
  background: #f4f7fa;
}

.closed-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #dff8ed;
  color: #0d7353;
  font-weight: 850;
}

.closed-card button {
  grid-column: 1 / -1;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #182430;
  font-weight: 780;
  cursor: pointer;
}

body.is-floating-window.is-mini .sidebar,
body.is-floating-window.is-mini .main {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

body.is-floating-window.is-mini {
  min-height: 100vh;
  background: linear-gradient(135deg, #a9b8b1, #d8dde2);
}

body.is-floating-window.is-mini .app-shell {
  min-height: 100vh;
}

body.is-floating-window.is-mini .mini-player {
  opacity: 1 !important;
  pointer-events: auto;
  transform: translateY(0) scale(1) !important;
}

body.is-floating-window.is-mini .mini-player {
  left: 14px;
  right: 14px;
  top: 16px;
  bottom: 14px;
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.is-floating-window.is-mini .mini-carousel {
  flex: 0 0 auto;
}

body.is-closed .sidebar,
body.is-closed .main,
body.is-closed .mini-player {
  display: none;
}

body.is-closed .closed-state {
  display: flex;
}

[data-panel].is-hidden {
  display: none;
}

@media (max-width: 1280px) {
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .brand div:not(.brand-mark), .nav-item span:last-child, .sidebar-footer { display: none; }
  .sidebar { align-items: center; }
  .overview-board, .overview-detail-grid { grid-template-columns: 1fr; }
  .risk-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    padding: 56px 10px 10px;
  }
  .nav-list { display: flex; }
  .main { padding: 14px; }
  .topbar, .panel-header, .table-header { display: grid; }
  .toolbar {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .summary-item {
    min-height: 54px;
    padding: 10px 14px;
  }
  .summary-item span { font-size: 14px; }
  .summary-item strong {
    min-width: 48px;
    height: 32px;
    font-size: 24px;
  }
  .metrics, .overview-board, .overview-detail-grid, .module-kpis, .detail-summary-grid, .risk-lanes, .shoot-strip, .system-grid { grid-template-columns: 1fr; }
  .overview-row { grid-template-columns: 42px 68px minmax(0, 1fr); }
  .overview-row .row-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .overview-row em {
    grid-column: 3;
  }
  .overview-doc-row { grid-template-columns: 24px 68px minmax(0, 1fr) 40px; }
  .overview-doc-row .row-action-button {
    grid-column: 1 / -1;
  }
  body.is-mini .sidebar { display: none; }
  .mini-player {
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* 2026-06-08 UI refresh: operational dashboard polish */
:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: #d9e1ea;
  --text: #182230;
  --muted: #647386;
  --blue: #2563eb;
  --green: #0f8f68;
  --amber: #b7791f;
  --red: #c24136;
  --cyan: #087f95;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 42px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 26px rgba(15, 23, 42, 0.05);
}

body {
  background:
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f6 46%, #e9eef4 100%);
}

.app-shell {
  grid-template-columns: 248px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 20px;
  background:
    linear-gradient(180deg, rgba(232, 242, 250, 0.86) 0%, rgba(241, 247, 252, 0.76) 46%, rgba(235, 244, 250, 0.84) 100%);
  color: #1f2933;
  border-right: 1px solid rgba(184, 205, 222, 0.68);
  box-shadow: inset -1px 0 rgba(255,255,255,0.76), 18px 0 44px rgba(80, 118, 155, 0.07);
  backdrop-filter: saturate(125%) blur(18px);
  -webkit-backdrop-filter: saturate(125%) blur(18px);
}

.brand {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(183, 204, 221, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 32px rgba(80, 118, 155, 0.08);
  backdrop-filter: saturate(125%) blur(16px);
  -webkit-backdrop-filter: saturate(125%) blur(16px);
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #f0fff8, #c9f7e4);
  color: #087050;
  box-shadow: 0 10px 28px rgba(2, 132, 93, 0.20);
}

.brand-title {
  font-size: 17px;
}

.brand-subtitle {
  color: #66737f;
}

.nav-list {
  gap: 8px;
}

.nav-item {
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #4b5f73;
  font-weight: 720;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.nav-item:hover {
  background: rgba(220, 235, 247, 0.72);
  color: #172536;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.82);
  color: #172536;
  box-shadow: 0 14px 30px rgba(80, 118, 155, 0.12);
  backdrop-filter: saturate(125%) blur(14px);
  -webkit-backdrop-filter: saturate(125%) blur(14px);
}

.nav-icon {
  color: #5b8eb8;
}

.nav-item.is-active .nav-icon {
  color: var(--blue);
}

.sidebar-footer {
  border: 1px solid rgba(183, 204, 221, 0.62);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 32px rgba(80, 118, 155, 0.08);
  backdrop-filter: saturate(125%) blur(16px);
  -webkit-backdrop-filter: saturate(125%) blur(16px);
}

.mini-label {
  color: #66737f;
}

.refresh-pill {
  background: rgba(255, 255, 255, 0.82);
  color: #172536;
}

.main {
  width: 100%;
  padding: 28px 30px 34px;
}

.topbar {
  min-height: 64px;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 26px;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 6px;
  font-size: 14px;
}

.status-line {
  min-width: 246px;
  padding: 0 12px;
  border: 1px solid rgba(217, 225, 234, 0.74);
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
  color: #52616f;
}

.icon-button,
.action-button {
  background: rgba(255,255,255,0.86);
  box-shadow: var(--shadow-soft);
}

.panel,
.metric,
.shoot-card {
  border-color: rgba(211, 220, 230, 0.92);
  box-shadow: var(--shadow);
}

.panel {
  position: relative;
  overflow: hidden;
}

.panel::before,
.overview-module::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: #cbd5e1;
}

.overview-module {
  padding: 18px;
  border-radius: 8px;
}

.overview-module.shooting-module::before {
  background: linear-gradient(90deg, #2563eb, #0f8f68);
}

.overview-module.docs-module::before {
  background: linear-gradient(90deg, #c24136, #b7791f);
}

.module-header h2,
.panel-header h2 {
  font-size: 17px;
}

.module-header p,
.panel-header p {
  margin-top: 5px;
  line-height: 1.45;
}

.module-link {
  height: 34px;
  border-color: #c8d5e4;
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.module-kpis {
  gap: 12px;
}

.module-kpi {
  position: relative;
  min-height: 96px;
  padding: 14px;
  border-color: #dce5ee;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.shooting-module .module-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.module-kpi.primary {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.module-kpi.danger {
  background: linear-gradient(180deg, #fff1f0 0%, #ffffff 100%);
}

.module-kpi.warning {
  background: linear-gradient(180deg, #fff7e8 0%, #ffffff 100%);
}

.module-kpi span,
.module-breakdown span,
.detail-summary-grid span,
.shoot-card span,
.system-grid span {
  color: #66758a;
}

.module-kpi strong {
  margin-top: 12px;
  font-size: 38px;
  color: #132238;
}

.module-kpi.primary strong {
  color: #1d4ed8;
}

.module-foot {
  background: #f8fafc;
  border-color: #dce5ee;
}

.module-foot strong {
  color: #132238;
  font-size: 19px;
}

.module-breakdown div,
.detail-summary-grid div,
.detail-filter-card,
.system-grid div {
  background: #fbfcfe;
  border-color: #e1e7ef;
}

.shooting-module .shoot-card-sample,
.detail-summary-grid .shoot-card-sample,
.shoot-card-sample {
  background: #eff6ff;
  border-color: #bfd6ff;
}

.shooting-module .shoot-card-ready,
.detail-summary-grid .shoot-card-ready,
.shoot-card-ready {
  background: #ecfdf5;
  border-color: #bdebd7;
}

.shooting-module .shoot-card-schedule,
.detail-summary-grid .shoot-card-schedule,
.detail-summary-grid .shoot-card-total,
.shoot-card-schedule,
.shoot-card-total {
  background: #eef8ff;
  border-color: #bddff5;
}

.shooting-module .shoot-card-backup,
.detail-summary-grid .shoot-card-backup,
.shoot-card-backup {
  background: #f4f0ff;
  border-color: #ddd4ef;
}

.detail-summary-grid .shoot-card-workload,
.shoot-card-workload {
  background: #fff7ed;
  border-color: #ffd2bd;
}

.detail-summary-grid .shoot-card-capacity,
.shoot-card-capacity {
  background: #ecfeff;
  border-color: #bdebf2;
}

.detail-summary-grid .shoot-card-sale,
.shoot-card-sale {
  background: #f5f7fa;
  border-color: #d5dde6;
}

.shoot-card-sample strong,
.shoot-card-sample b {
  color: #1d4ed8;
}

.shoot-card-ready strong,
.shoot-card-ready b {
  color: #0b6b4c;
}

.shoot-card-schedule strong,
.shoot-card-schedule b,
.shoot-card-total strong,
.shoot-card-total b {
  color: #075985;
}

.shoot-card-backup strong,
.shoot-card-backup b {
  color: #6d4bb5;
}

.shoot-card-workload strong,
.shoot-card-workload b {
  color: #b7791f;
}

.shoot-card-capacity strong,
.shoot-card-capacity b {
  color: #075a73;
}

.shoot-card-sale strong,
.shoot-card-sale b {
  color: #4d5964;
}

.docs-module .module-kpi.danger,
.detail-card-serious {
  background: #fff1ef;
  border-color: #ffc7c2;
}

.docs-module .module-kpi.warning,
.detail-card-overdue {
  background: #fff7ed;
  border-color: #ffd2bd;
}

.docs-module .module-kpi:not(.danger):not(.warning):not(.light),
.detail-card-warning {
  background: #fffbeb;
  border-color: #f5dc9f;
}

.docs-module .module-kpi.light,
.detail-card-light {
  background: #fbfddf;
  border-color: #e1e9a7;
}

.detail-card-pending {
  background: #eff6ff;
  border-color: #bfd6ff;
}

.detail-card-not-shipped {
  background: #f5f7fa;
  border-color: #d5dde6;
}

.detail-card-not-due {
  background: #ecfdf5;
  border-color: #bdebd7;
}

.detail-card-air {
  background: #e6fbff;
  border-color: #bdebf2;
}

.detail-card-pending strong,
.detail-card-pending b {
  color: #1d4ed8;
}

.detail-card-serious strong,
.detail-card-serious b,
.docs-module .module-kpi.danger strong {
  color: var(--red);
}

.detail-card-overdue strong,
.detail-card-overdue b,
.docs-module .module-kpi.warning strong {
  color: var(--amber);
}

.detail-card-warning strong,
.detail-card-warning b,
.docs-module .module-kpi:not(.danger):not(.warning):not(.light) strong {
  color: #7b4b00;
}

.detail-card-light strong,
.detail-card-light b,
.docs-module .module-kpi.light strong {
  color: #60700b;
}

.detail-card-not-shipped strong,
.detail-card-not-shipped b {
  color: #4d5964;
}

.detail-card-not-due strong,
.detail-card-not-due b {
  color: #0b6b4c;
}

.detail-card-air strong,
.detail-card-air b {
  color: #075a73;
}

.detail-filter-card.is-active {
  box-shadow: inset 0 0 0 1px currentColor, var(--shadow-soft);
}

.overview-detail-panel {
  min-height: 452px;
}

.badge {
  height: 32px;
  background: #ecfdf5;
  color: #087050;
}

.overview-row {
  min-height: 58px;
  border-color: #e3e9f0;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.overview-row:hover {
  transform: translateY(-1px);
  border-color: #cdd8e6;
  box-shadow: var(--shadow-soft);
}

.sku-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.85fr) minmax(260px, 0.65fr);
}

.risk-lanes {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.risk-lane {
  border-color: #dde6ef;
  background: #f7f9fc;
}

.lane-title {
  color: #243648;
}

.risk-item {
  border-color: #e2e8f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.bar-track {
  height: 8px;
  background: #e6edf4;
}

.bar-fill {
  background: linear-gradient(90deg, #2563eb, #13a076);
}

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

.shoot-card {
  min-height: 104px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.shoot-card strong {
  font-size: 32px;
}

.table-panel {
  padding-bottom: 12px;
}

.table-wrap {
  border-color: #dce5ee;
  background: #fff;
}

table {
  min-width: 900px;
}

th {
  height: 42px;
  background: #f6f8fb;
  color: #526174;
  font-size: 12px;
  text-transform: none;
  box-shadow: inset 0 -1px #dce5ee;
}

td {
  height: 54px;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #f8fafc;
}

.segmented {
  gap: 4px;
  background: #eef3f8;
}

.segment {
  min-width: 66px;
  font-weight: 720;
}

.segment.is-active {
  color: #172536;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.status-chip {
  justify-content: center;
  min-width: 62px;
  border: 1px solid transparent;
  font-weight: 780;
}

.status-air { border-color: #bdebf2; }
.status-serious { border-color: #ffc7c2; }
.status-overdue { border-color: #ffd2bd; }
.status-warning { border-color: #f5dc9f; }
.status-light { border-color: #e1e9a7; }
.status-notDue { border-color: #bdebd7; }
.status-notShipped { border-color: #d5dde6; }
.status-readyShipped { border-color: #bddff5; }
.status-readyBackup { border-color: #ddd4ef; }
.status-shootingProgress { border-color: #bfd6ff; }

.system-panel {
  margin-bottom: 18px;
}

@media (max-width: 1380px) {
  .shooting-module .module-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shoot-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .risk-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 76px 1fr; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { padding: 8px; }
}

@media (max-width: 760px) {
  .sidebar {
    height: auto;
    padding-top: 14px;
  }
  .main { padding: 16px; }
  .status-line {
    min-width: 0;
    justify-content: flex-start;
  }
  .shoot-strip,
  .risk-lanes {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-10 color simplification: only soft blue and soft green cards */
:root {
  --soft-blue-bg: #eff6ff;
  --soft-blue-line: #bfd6ff;
  --soft-blue-text: #1d4ed8;
  --shoot-blue-number: #386fc2;
  --soft-green-bg: #ecfdf5;
  --soft-green-line: #bdebd7;
  --soft-green-text: #0b6b4c;
}

.shoot-card-sample,
.shoot-card-ready,
.shoot-card-schedule,
.shoot-card-total,
.shoot-card-workload,
.shoot-card-backup,
.shoot-card-capacity,
.shoot-card-sale,
.docs-module .module-kpi.danger,
.docs-module .module-kpi.warning,
.docs-module .module-kpi:not(.danger):not(.warning):not(.light),
.detail-card-pending,
.detail-card-serious,
.detail-card-overdue,
.detail-card-warning,
.detail-card-air,
.status-readyShipped,
.status-shootingProgress,
.status-air,
.status-serious,
.status-overdue,
.status-warning {
  background: var(--soft-blue-bg) !important;
  border-color: var(--soft-blue-line) !important;
  color: var(--soft-blue-text) !important;
}

.docs-module .module-kpi.light,
.detail-card-light,
.detail-card-not-shipped,
.detail-card-not-due,
.status-readyBackup,
.status-light,
.status-notDue,
.status-notShipped {
  background: var(--soft-green-bg) !important;
  border-color: var(--soft-green-line) !important;
  color: var(--soft-green-text) !important;
}

.shoot-card-sample strong,
.shoot-card-sample b,
.shoot-card-schedule strong,
.shoot-card-schedule b,
.shoot-card-total strong,
.shoot-card-total b,
.shoot-card-workload strong,
.shoot-card-workload b,
.shoot-card-ready strong,
.shoot-card-ready b,
.shoot-card-backup strong,
.shoot-card-backup b,
.shoot-card-capacity strong,
.shoot-card-capacity b,
.shoot-card-sale strong,
.shoot-card-sale b {
  color: var(--shoot-blue-number) !important;
}

.detail-card-pending strong,
.detail-card-pending b,
.detail-card-serious strong,
.detail-card-serious b,
.detail-card-overdue strong,
.detail-card-overdue b,
.detail-card-warning strong,
.detail-card-warning b,
.detail-card-air strong,
.detail-card-air b,
.docs-module .module-kpi.danger strong,
.docs-module .module-kpi.warning strong,
.docs-module .module-kpi:not(.danger):not(.warning):not(.light) strong {
  color: var(--soft-blue-text) !important;
}

.detail-card-light strong,
.detail-card-light b,
.detail-card-not-shipped strong,
.detail-card-not-shipped b,
.detail-card-not-due strong,
.detail-card-not-due b,
.docs-module .module-kpi.light strong {
  color: var(--soft-green-text) !important;
}

/* Restore document-monitor status colors while keeping shooting cards simplified. */
.docs-module .module-kpi.danger,
.detail-card-pending,
.detail-card-serious {
  background: #fff1ef !important;
  border-color: #ffc7c2 !important;
  color: #8f1c16 !important;
}

.docs-module .module-kpi.warning,
.detail-card-overdue {
  background: #fff7ed !important;
  border-color: #ffd2bd !important;
  color: #8d3513 !important;
}

.docs-module .module-kpi:not(.danger):not(.warning):not(.light),
.detail-card-warning {
  background: #fffbeb !important;
  border-color: #f5dc9f !important;
  color: #7b4b00 !important;
}

.docs-module .module-kpi.light,
.detail-card-light {
  background: #fbfddf !important;
  border-color: #e1e9a7 !important;
  color: #60700b !important;
}

.detail-card-not-shipped {
  background: #f5f7fa !important;
  border-color: #d5dde6 !important;
  color: #4d5964 !important;
}

.detail-card-not-due {
  background: #ecfdf5 !important;
  border-color: #bdebd7 !important;
  color: #0b6b4c !important;
}

.detail-card-air {
  background: #e6fbff !important;
  border-color: #bdebf2 !important;
  color: #075a73 !important;
}

.status-serious,
.status-overdue,
.status-warning,
.status-light,
.status-notDue,
.status-notShipped,
.status-air {
  color: inherit !important;
}

.status-serious {
  color: #8f1c16 !important;
  background: #ffe5e2 !important;
  border-color: #ffc7c2 !important;
}

.status-overdue {
  color: #8d3513 !important;
  background: #ffe8db !important;
  border-color: #ffd2bd !important;
}

.status-warning {
  color: #7b4b00 !important;
  background: #fff1d2 !important;
  border-color: #f5dc9f !important;
}

.status-light {
  color: #60700b !important;
  background: #f2f6c9 !important;
  border-color: #e1e9a7 !important;
}

.status-notDue {
  color: #0b6b4c !important;
  background: #e2f7ed !important;
  border-color: #bdebd7 !important;
}

.status-notShipped {
  color: #4d5964 !important;
  background: #edf1f4 !important;
  border-color: #d5dde6 !important;
}

.status-air {
  color: #075a73 !important;
  background: #dff7fb !important;
  border-color: #bdebf2 !important;
}

.docs-module .module-kpi.danger strong,
.detail-card-pending strong,
.detail-card-pending b,
.detail-card-serious strong,
.detail-card-serious b {
  color: var(--red) !important;
}

.docs-module .module-kpi.warning strong,
.detail-card-overdue strong,
.detail-card-overdue b {
  color: var(--amber) !important;
}

.docs-module .module-kpi:not(.danger):not(.warning):not(.light) strong,
.detail-card-warning strong,
.detail-card-warning b {
  color: #7b4b00 !important;
}

.docs-module .module-kpi.light strong,
.detail-card-light strong,
.detail-card-light b {
  color: #60700b !important;
}

.detail-card-not-shipped strong,
.detail-card-not-shipped b {
  color: #4d5964 !important;
}

.detail-card-not-due strong,
.detail-card-not-due b {
  color: #0b6b4c !important;
}

.detail-card-air strong,
.detail-card-air b {
  color: #075a73 !important;
}

.overview-module .module-kpi,
.overview-module .module-kpi.danger,
.overview-module .module-kpi.warning,
.overview-module .module-kpi.light,
.overview-module.docs-module .module-kpi,
.overview-module.docs-module .module-kpi.danger,
.overview-module.docs-module .module-kpi.warning,
.overview-module.docs-module .module-kpi:not(.danger):not(.warning):not(.light),
.overview-module.docs-module .module-kpi.light {
  background: #ffffff !important;
  border-color: #dfe8f0 !important;
  color: #5d6c79 !important;
}

.overview-module .module-kpi span {
  color: #172536 !important;
}

.overview-module {
  background: #f5f7fb;
}

/* 2026-07-08 white theme: keep metric number colors, flatten page chrome. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --line: #e5e7eb;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 32px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.05);
}

body {
  background: #ffffff;
}

.main,
.panel,
.overview-module,
.table-panel,
.system-panel {
  background: #ffffff;
}

.sidebar {
  background: #f3f4f6;
  border-right-color: #e5e7eb;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand,
.sidebar-footer {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-item:hover,
.nav-item.is-active,
.refresh-pill {
  background: #e5e7eb;
  box-shadow: none;
}

.topbar {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f3f4f6;
}

.status-line,
.icon-button,
.action-button {
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: none;
}

.status-line {
  background: #e5e7eb;
  color: #4b5563;
}

.overview-row,
.system-grid div {
  background: #ffffff !important;
}

.overview-module::before,
.panel::before {
  background: #d1d5db;
}

/* Restore status color on metric cards while keeping the page chrome white. */
.shooting-module .shoot-card-sample,
.detail-summary-grid .shoot-card-sample,
.shoot-card-sample {
  background: #eff6ff !important;
  border-color: #bfd6ff !important;
}

.shooting-module .shoot-card-ready,
.detail-summary-grid .shoot-card-ready,
.shoot-card-ready {
  background: #ecfdf5 !important;
  border-color: #bdebd7 !important;
}

.shooting-module .shoot-card-schedule,
.detail-summary-grid .shoot-card-schedule,
.detail-summary-grid .shoot-card-total,
.shoot-card-schedule,
.shoot-card-total {
  background: #eef8ff !important;
  border-color: #bddff5 !important;
}

.shooting-module .shoot-card-capacity,
.detail-summary-grid .shoot-card-capacity,
.shoot-card-capacity {
  background: #ecfeff !important;
  border-color: #bdebf2 !important;
}

.shooting-module .shoot-card-sale,
.detail-summary-grid .shoot-card-sale,
.shoot-card-sale {
  background: #f5f7fa !important;
  border-color: #d5dde6 !important;
}

.detail-summary-grid .shoot-card-backup,
.shoot-card-backup {
  background: #f4f0ff !important;
  border-color: #ddd4ef !important;
}

.detail-summary-grid .shoot-card-workload,
.shoot-card-workload {
  background: #fff7ed !important;
  border-color: #ffd2bd !important;
}

.overview-module.docs-module .module-kpi.danger,
.detail-card-pending,
.detail-card-serious {
  background: #fff1ef !important;
  border-color: #ffc7c2 !important;
}

.overview-module.docs-module .module-kpi.warning,
.detail-card-overdue {
  background: #fff7ed !important;
  border-color: #ffd2bd !important;
}

.overview-module.docs-module .module-kpi:not(.danger):not(.warning):not(.light),
.detail-card-warning {
  background: #fffbeb !important;
  border-color: #f5dc9f !important;
}

.overview-module.docs-module .module-kpi.light,
.detail-card-light {
  background: #fbfddf !important;
  border-color: #e1e9a7 !important;
}

.detail-card-not-shipped {
  background: #f5f7fa !important;
  border-color: #d5dde6 !important;
}

.detail-card-not-due {
  background: #ecfdf5 !important;
  border-color: #bdebd7 !important;
}

.detail-card-air {
  background: #e6fbff !important;
  border-color: #bdebf2 !important;
}

/* 2026-07-08: unify large and small metric cards to the same light gray. */
.overview-module .module-kpi,
.overview-module .module-kpi.danger,
.overview-module .module-kpi.warning,
.overview-module .module-kpi.light,
.overview-module.docs-module .module-kpi,
.overview-module.docs-module .module-kpi.danger,
.overview-module.docs-module .module-kpi.warning,
.overview-module.docs-module .module-kpi:not(.danger):not(.warning):not(.light),
.overview-module.docs-module .module-kpi.light,
.detail-summary-grid div,
.detail-summary-grid .shoot-card-sample,
.detail-summary-grid .shoot-card-ready,
.detail-summary-grid .shoot-card-schedule,
.detail-summary-grid .shoot-card-total,
.detail-summary-grid .shoot-card-capacity,
.detail-summary-grid .shoot-card-sale,
.detail-summary-grid .shoot-card-backup,
.detail-summary-grid .shoot-card-workload,
.detail-filter-card,
.detail-card-pending,
.detail-card-serious,
.detail-card-overdue,
.detail-card-warning,
.detail-card-light,
.detail-card-not-shipped,
.detail-card-not-due,
.detail-card-air {
  background: #f5f7fa !important;
  border-color: #d5dde6 !important;
}

/* 2026-07-15 overview: one-column collapsible status modules. */
.overview-board {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.overview-collapsible {
  min-height: 0;
  padding: 0;
  gap: 0;
}

.overview-collapse-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2.3fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.overview-collapse-heading h2 {
  margin: 0;
  font-size: 17px;
}

.overview-collapse-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.overview-collapse-summary .module-kpis,
.shooting-module .overview-collapse-summary .module-kpis {
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
  min-width: 0;
}

.docs-module .overview-collapse-summary .module-kpis {
  grid-template-columns: repeat(8, minmax(64px, 1fr));
}

.overview-collapse-summary .module-kpi {
  min-height: 58px;
  padding: 8px 10px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.overview-collapse-summary .module-kpi:hover {
  border-color: #94a3b8 !important;
}

.overview-collapse-summary .module-kpi.is-active {
  border-color: #2563eb !important;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.overview-collapsible:not(.is-expanded) .overview-collapse-summary .module-kpi.is-active {
  border-color: #d5dde6 !important;
  box-shadow: none;
}

.overview-collapse-summary .module-kpi span {
  font-size: 12px;
}

.overview-collapse-summary .module-kpi strong {
  margin-top: 5px;
  font-size: 24px;
}

.overview-collapse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  font-weight: 720;
  cursor: pointer;
}

.overview-collapse-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.overview-collapse-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.overview-collapsible.is-expanded .overview-collapse-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.overview-collapsible-detail {
  padding: 14px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.overview-collapsible-detail[hidden] {
  display: none;
}

.overview-detail-header {
  min-height: 34px;
  margin-bottom: 10px;
}

.overview-detail-header p {
  margin: 0;
}

@media (max-width: 1380px) {
  .overview-collapse-summary {
    grid-template-columns: minmax(170px, 0.65fr) minmax(0, 2.35fr) auto;
  }

  .overview-collapse-summary .module-kpis,
  .shooting-module .overview-collapse-summary .module-kpis {
    grid-template-columns: repeat(5, minmax(76px, 1fr));
  }
}

@media (max-width: 1050px) {
  .overview-collapse-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .overview-collapse-summary .module-kpis {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .overview-collapse-summary .module-kpis,
  .shooting-module .overview-collapse-summary .module-kpis,
  .docs-module .overview-collapse-summary .module-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-collapse-button {
    min-width: 96px;
  }
}

/* 2026-07-15: emphasize dashboard status and enlarge the expanded workspace. */
.overview-board {
  gap: 16px;
}

.overview-collapse-summary {
  min-height: 140px;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 2.28fr) auto;
  gap: 20px;
  padding: 20px 22px;
}

.overview-collapse-heading h2 {
  font-size: 20px;
}

.overview-collapse-heading p {
  margin-top: 7px;
  font-size: 13px;
}

.overview-collapse-summary .module-kpi {
  min-height: 92px;
  padding: 14px;
}

.overview-collapse-summary .module-kpi span {
  font-size: 13px;
  line-height: 1.35;
}

.overview-collapse-summary .module-kpi strong {
  margin-top: 9px;
  font-size: 34px;
}

.docs-module .overview-collapse-summary .module-kpi {
  display: flex;
  flex-direction: column;
}

.docs-module .overview-collapse-summary .module-kpi strong {
  margin-top: auto;
}

#overviewTotalUnuploadedCount,
#overviewPendingUpload,
#overviewNotShippedCount {
  color: #386fc2 !important;
}

.overview-collapse-button {
  min-width: 116px;
  height: 44px;
  font-size: 14px;
}

.overview-collapsible-detail {
  padding: 16px 20px 20px;
}

.overview-collapsible.is-expanded .overview-list {
  height: clamp(520px, calc(100vh - 270px), 1100px);
  max-height: none;
  align-content: start;
}

#overviewReadyList .overview-row {
  min-height: 110px;
  align-items: start;
  padding-top: 10px;
  padding-bottom: 10px;
}

.system-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 2.8fr);
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 12px 14px;
}

.system-panel .panel-header {
  margin: 0;
}

.system-panel .panel-header p {
  margin-top: 4px;
  font-size: 12px;
}

.system-panel .system-grid {
  gap: 8px;
}

.system-panel .system-grid div {
  min-height: 58px;
  padding: 9px 10px;
}

.system-panel .system-grid span {
  margin-bottom: 4px;
}

@media (max-width: 1380px) {
  .overview-collapse-summary {
    grid-template-columns: minmax(190px, 0.62fr) minmax(0, 2.38fr) auto;
  }

  .overview-collapse-summary .module-kpi {
    min-height: 86px;
    padding: 12px;
  }

  .overview-collapse-summary .module-kpi strong {
    font-size: 30px;
  }

  .system-panel {
    grid-template-columns: minmax(140px, 0.5fr) minmax(0, 2fr) minmax(230px, 0.8fr);
  }
}

@media (max-width: 1050px) {
  .overview-collapse-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .system-panel .system-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .overview-collapse-summary {
    min-height: 0;
    padding: 16px;
  }

  .overview-collapse-summary .module-kpi {
    min-height: 78px;
  }

  .overview-collapsible.is-expanded .overview-list {
    height: calc(100vh - 230px);
    min-height: 420px;
  }

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

/* 2026-07-19: full-width two-column overview without sidebar navigation. */
.app-shell {
  display: block;
}

.main {
  max-width: 1880px;
  margin: 0 auto;
  padding: 28px 32px 36px;
}

.overview-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.overview-collapse-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  gap: 16px;
  padding: 20px;
}

.overview-collapse-heading h2 {
  font-size: 21px;
}

.overview-collapse-summary .module-kpis,
.shooting-module .overview-collapse-summary .module-kpis,
.docs-module .overview-collapse-summary .module-kpis {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.overview-collapse-summary .module-kpi,
.docs-module .overview-collapse-summary .module-kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
}

.overview-collapse-summary .module-kpi strong,
.docs-module .overview-collapse-summary .module-kpi strong {
  margin-top: 0;
  font-size: 30px;
  line-height: 1;
  text-align: right;
}

.overview-collapse-summary .module-kpi span {
  padding-right: 12px;
}

.overview-collapse-button {
  align-self: stretch;
}

@media (max-width: 1100px) {
  .main {
    padding: 20px;
  }

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

@media (max-width: 640px) {
  .main {
    padding: 14px;
  }

  .overview-collapse-summary {
    padding: 16px;
  }
}

/* 2026-07-19: compact aligned metric grids with persistent details. */
.overview-collapse-summary {
  min-height: 250px;
  justify-content: flex-start;
}

.overview-collapse-heading {
  min-height: 56px;
}

.overview-collapse-summary .module-kpis,
.shooting-module .overview-collapse-summary .module-kpis,
.docs-module .overview-collapse-summary .module-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.shooting-module .overview-collapse-summary .module-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-collapse-summary .module-kpi,
.docs-module .overview-collapse-summary .module-kpi {
  min-height: 78px;
  padding: 10px 12px;
}

.overview-collapse-summary .module-kpi span {
  padding-right: 6px;
  font-size: 12px;
}

.overview-collapse-summary .module-kpi strong,
.docs-module .overview-collapse-summary .module-kpi strong {
  font-size: 28px;
}

/* 2026-07-19: stack each status label above its count. */
.overview-collapse-summary .module-kpi,
.docs-module .overview-collapse-summary .module-kpi {
  grid-template-columns: 1fr;
  align-content: start;
}

.overview-collapse-summary .module-kpi span {
  padding-right: 0;
}

.overview-collapse-summary .module-kpi strong,
.docs-module .overview-collapse-summary .module-kpi strong {
  margin-top: 6px;
  text-align: left;
}

.overview-collapsible-detail {
  padding: 16px 20px 20px;
}

.overview-collapsible .overview-list {
  height: clamp(460px, calc(100vh - 390px), 760px);
  max-height: none;
}

@media (max-width: 1100px) {
  .overview-collapse-summary {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .overview-collapse-summary .module-kpis,
  .shooting-module .overview-collapse-summary .module-kpis,
  .docs-module .overview-collapse-summary .module-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-collapsible .overview-list {
    height: 480px;
  }
}

/* 2026-07-19: use one typography hierarchy for both detail lists. */
.overview-row > div:nth-child(2) > strong,
#overviewReadyList .label-sku-line {
  color: #172536;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.35;
}

#overviewReadyList .label-sku-text {
  margin-top: 0;
  color: #172536;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.product-info {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: help;
  max-width: 100%;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--apple-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.product-info-line {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 16px;
  overflow: hidden;
  line-height: 1.25;
}

.product-info:hover,
.product-info:focus-visible {
  color: var(--apple-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-label-sku .product-info {
  font-size: 11px;
}

.doc-label-sku + .product-info-line {
  margin-top: 2px;
}

.overview-doc-row {
  grid-template-columns: 24px 58px minmax(0, 1fr) 48px 84px 44px;
  min-height: 92px;
  align-items: start;
  padding: 10px;
  column-gap: 10px;
}

.overview-doc-row .doc-card-media {
  display: grid;
  min-width: 0;
  gap: 4px;
  justify-items: center;
  align-content: start;
}

.overview-doc-row .doc-card-media .sku-thumb,
.overview-doc-row .doc-card-media .sku-thumb-button {
  width: 44px;
  height: 44px;
}

.overview-doc-row .doc-card-media .status-chip {
  min-width: 54px;
  max-width: 100%;
  padding: 2px 5px;
  font-size: 11px;
}

.overview-doc-row > div {
  min-width: 0;
}

.overview-doc-row .doc-label-sku {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.overview-doc-row .doc-card-meta {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-doc-row > .transport-icon {
  align-self: center;
  justify-self: center;
}

.shooting-task-meta,
.doc-card-meta {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.shooting-task-status {
  color: var(--apple-secondary);
}

/* 2026-07-19: compact navigation and group statistics workspace. */
.app-shell {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100vh;
  gap: 22px;
  padding: 18px 12px;
  background: #f3f6fa;
  border-right: 1px solid #dce5ee;
  box-shadow: none;
}

.brand.brand-compact {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 56px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #c8dfd4;
  border-radius: 8px;
  background: #eafaf2;
  box-shadow: none;
  color: #087050;
  font-size: 18px;
  font-weight: 800;
}

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

.sidebar .nav-item {
  display: grid;
  place-items: center;
  gap: 5px;
  height: 66px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #52616f;
  font-size: 12px;
  font-weight: 720;
}

.sidebar .nav-item.is-active {
  border-color: #c9dbef;
  background: #ffffff;
  box-shadow: none;
  color: #172536;
}

.sidebar .nav-icon {
  width: 20px;
  height: 20px;
  color: #386fc2;
}

.nav-icon-group {
  position: relative;
  display: block;
  border-bottom: 2px solid currentColor;
}

.nav-icon-group::before,
.nav-icon-group::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 4px;
  background: currentColor;
  border-radius: 2px 2px 0 0;
}

.nav-icon-group::before {
  left: 3px;
  height: 10px;
}

.nav-icon-group::after {
  right: 3px;
  height: 16px;
  box-shadow: -5px 5px 0 currentColor;
}

.group-dashboard {
  display: grid;
  gap: 18px;
}

.group-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0;
}

.group-dashboard-header h2 {
  margin: 0;
  font-size: 22px;
}

.group-dashboard-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.group-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.group-category-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--apple-secondary);
  font-size: 12px;
  font-weight: 650;
}

.group-detail-title-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.group-detail-title-row h2 {
  margin: 0;
}

.group-detail-title-block h2 {
  margin: 0;
}

.group-detail-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.group-category-filter select {
  height: 34px;
  min-width: 108px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--apple-label);
  font-size: 12px;
  font-weight: 650;
}

.group-month-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--apple-label);
  font-size: 13px;
  font-weight: 650;
}

.group-month-filter select {
  height: 34px;
  min-width: 112px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--apple-label);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.group-month-filter select:disabled {
  opacity: 0.6;
}

.member-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #66737f;
  font-size: 12px;
}

.group-tab {
  min-width: 46px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d5e0eb;
  border-radius: 7px;
  background: #ffffff;
  color: #52616f;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.group-tab.is-active {
  border-color: #386fc2;
  background: #eef5ff;
  color: #1d4ed8;
}

.member-tab {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d5e0eb;
  border-radius: 7px;
  background: #ffffff;
  color: #52616f;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.member-tab.is-active {
  border-color: #0f9f6e;
  background: #ecfdf5;
  color: #087050;
}

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

.group-kpi-grid > button {
  min-height: 88px;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.group-kpi-grid > button:hover,
.group-kpi-grid > button.is-active {
  border-color: #386fc2;
  background: #f5f9ff;
}

.group-kpi-grid > button:focus-visible {
  outline: 2px solid #386fc2;
  outline-offset: 2px;
}

.group-kpi-grid span {
  display: block;
  color: #66737f;
  font-size: 12px;
  font-weight: 720;
}

.group-kpi-grid strong {
  display: block;
  margin-top: 8px;
  color: #172536;
  font-size: 28px;
  line-height: 1;
}

.group-kpi-grid > button:nth-child(-n+4) strong { color: #386fc2; }
.group-kpi-grid > button:nth-child(n+5) strong { color: #a16207; }

.group-kpi-detail {
  padding: 18px;
}

.group-detail-row em {
  color: #52616f;
  font-style: normal;
}

.group-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.group-chart-panel,
.group-trend-panel {
  padding: 18px;
}

.group-chart-panel .panel-header,
.group-trend-panel .panel-header {
  margin-bottom: 14px;
}

.group-bar-chart {
  min-width: 0;
}

.group-matrix-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.group-matrix {
  min-width: 500px;
  display: grid;
  gap: 7px;
}

.group-matrix-header,
.group-matrix-row {
  display: grid;
  grid-template-columns: 48px repeat(var(--metric-count), minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.group-matrix-header {
  padding: 0 8px 2px;
  color: #778493;
  font-size: 11px;
  font-weight: 720;
}

.group-matrix-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  white-space: nowrap;
}

.group-matrix-heading i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #386fc2;
}

.group-matrix-heading.pendingSchedule i { background: #b7791f; }
.group-matrix-heading.shootingProgress i { background: #0f9f6e; }
.group-matrix-heading.pendingUpload i { background: #c24136; }
.group-matrix-heading.notShipped i { background: #64748b; }
.group-matrix-heading.risk i { background: #dc4b3e; }

.group-matrix-row {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #f8fafc;
}

.group-matrix-row:hover {
  background: #f1f6fc;
}

.group-matrix-label {
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 780;
  text-align: left;
  cursor: pointer;
}

.group-matrix-label.is-active {
  color: #1d4ed8;
}

.group-matrix-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.group-matrix-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebf3;
}

.group-matrix-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #386fc2;
}

.group-matrix-cell.pendingSchedule .group-matrix-track i { background: #b7791f; }
.group-matrix-cell.shootingProgress .group-matrix-track i { background: #0f9f6e; }
.group-matrix-cell.pendingUpload .group-matrix-track i { background: #c24136; }
.group-matrix-cell.notShipped .group-matrix-track i { background: #64748b; }
.group-matrix-cell.risk .group-matrix-track i { background: #dc4b3e; }

.group-matrix-cell b {
  color: #334155;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.group-trend-chart {
  position: relative;
  min-height: 260px;
}

.group-trend-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #52616f;
  font-size: 12px;
}

.group-trend-legend span {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.group-trend-legend .can-shoot { background: #386fc2; }
.group-trend-legend .sample-ready { background: #0d7353; }
.group-trend-legend .pending-upload { background: #c24136; }
.group-trend-legend .daily-sample-arrivals { background: #0d7353; }

.group-trend-chart svg {
  display: block;
  width: 100%;
  max-height: 240px;
}

.group-trend-chart text {
  fill: #7b8794;
  font-size: 12px;
}

.trend-axis { stroke: #cfd9e5; }
.trend-grid { stroke: #e6edf4; stroke-dasharray: 4 4; }
.trend-line { fill: none; stroke-width: 3; }
.trend-line.can-shoot { stroke: #386fc2; }
.trend-line.sample-ready { stroke: #0d7353; }
.trend-line.pending-upload { stroke: #c24136; }
.trend-dot.can-shoot { fill: #386fc2; }
.trend-dot.sample-ready { fill: #0d7353; }
.trend-dot.pending-upload { fill: #c24136; }
.trend-line.daily-sample-arrivals { stroke: #0d7353; }
.trend-dot.daily-sample-arrivals { fill: #0d7353; }

.trend-hit-area {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.trend-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 132px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(29, 29, 31, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.trend-tooltip strong,
.trend-tooltip span {
  display: block;
}

.trend-tooltip strong {
  margin-bottom: 3px;
  font-weight: 700;
}

.trend-tooltip b {
  float: right;
  margin-left: 18px;
  font-variant-numeric: tabular-nums;
}

.trend-tooltip-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 5px 1px 0;
  border-radius: 50%;
}

.trend-tooltip-dot.sample-ready { background: #54c7a0; }
.trend-tooltip-dot.can-shoot { background: #70a8ff; }
.trend-tooltip-dot.pending-upload { background: #ff8178; }
.trend-tooltip-dot.daily-sample-arrivals { background: #54c7a0; }

@media (max-width: 1200px) {
  .group-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    width: auto;
    height: auto;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid #dce5ee;
  }
  .brand.brand-compact { width: 42px; height: 42px; min-height: 42px; margin: 0; font-size: 14px; }
  .sidebar .nav-list { display: flex; }
  .sidebar .nav-item { width: 72px; height: 42px; grid-template-columns: auto 1fr; gap: 4px; padding: 5px 8px; }
  .group-dashboard-header { display: grid; }
  .group-tabs { justify-content: flex-start; }
  .group-chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .group-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-dashboard-header h2 { font-size: 20px; }
  .group-chart-panel, .group-trend-panel { padding: 14px; }
  .group-matrix { min-width: 470px; }
  .group-matrix-header,
  .group-matrix-row { gap: 8px; }
}

.overview-row > div:nth-child(2) > span {
  color: #66737f;
  font-size: 13px;
}

/* Group task details prioritize SKU scanning over a wide single-row layout. */
#groupDetailList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#groupDetailList .group-detail-row {
  min-height: 84px;
  grid-template-columns: 48px minmax(0, 1fr) 82px;
  column-gap: 8px;
  padding: 8px;
}

#groupKpiDetail .overview-list {
  max-height: clamp(600px, calc(100vh - 330px), 900px);
}

#groupDetailList .group-detail-actions {
  display: grid;
  grid-template-columns: minmax(120px, 168px) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

#groupDetailList .group-detail-actions .photo-status-trigger {
  width: 100%;
}

#groupDetailList .group-detail-actions .doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#groupDetailList .group-detail-actions .doc-actions .row-link-button,
#groupDetailList .group-detail-actions .doc-actions .warehouse-image-button {
  width: auto;
  min-width: 76px;
  padding: 0 9px;
}

/* Apple-style group workspace: quiet surfaces, clear hierarchy, and restrained color. */
.group-dashboard {
  gap: 20px;
}

.group-dashboard-header {
  padding: 4px 2px;
}

.group-dashboard-header h2 {
  color: var(--apple-label);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.group-dashboard-header p,
.member-tabs {
  color: var(--apple-secondary);
}

.group-tabs,
.member-tabs {
  gap: 8px;
}

.group-tabs .group-tab {
  min-width: 64px;
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
}

.group-tab,
.member-tab {
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--apple-secondary);
  font-weight: 650;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.group-category-filter {
  margin-left: 0;
  color: var(--apple-label);
  font-size: 13px;
}

.group-category-filter select {
  text-align: center;
}

.group-tab:hover,
.member-tab:hover {
  background: rgba(0, 122, 255, 0.06);
  border-color: rgba(0, 122, 255, 0.28);
}

.group-tab:active,
.member-tab:active {
  transform: scale(0.97);
}

.group-tab.is-active {
  border-color: rgba(0, 122, 255, 0.55);
  background: rgba(0, 122, 255, 0.1);
  color: var(--apple-label);
}

.group-tabs .group-tab {
  color: var(--apple-label);
}

.member-tab.is-active {
  border-color: rgba(52, 199, 89, 0.42);
  background: rgba(52, 199, 89, 0.1);
  color: #168345;
}

.group-kpi-grid > button {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.035), inset 0 1px rgba(255, 255, 255, 0.8);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.group-kpi-grid > button:hover,
.group-kpi-grid > button.is-active {
  border-color: rgba(0, 122, 255, 0.45);
  background: rgba(0, 122, 255, 0.07);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.08);
}

.group-kpi-grid > button:active {
  transform: scale(0.985);
}

.group-kpi-grid span {
  color: var(--apple-secondary);
  font-weight: 600;
}

.group-kpi-grid strong {
  color: var(--apple-label);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.group-chart-panel,
.group-trend-panel,
.group-kpi-detail {
  border-color: rgba(60, 60, 67, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.045), inset 0 1px rgba(255, 255, 255, 0.86);
}

#groupDetailList .group-detail-row {
  min-height: 84px;
  border-color: rgba(60, 60, 67, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  transition: background 150ms ease, border-color 150ms ease;
}

#groupDetailList .group-detail-row:hover {
  border-color: rgba(0, 122, 255, 0.3);
  background: rgba(0, 122, 255, 0.035);
}

#groupDetailList .group-detail-member {
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.09);
  color: var(--apple-blue);
  font-weight: 650;
}

#groupDetailList .group-detail-side {
  display: grid;
  justify-items: end;
  align-content: center;
  min-width: 0;
}

#groupDetailList .group-detail-shipment-age {
  color: #4f5f72;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.overview-detail-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.overview-scope {
  display: flex;
  align-items: center;
  gap: 6px;
}

.overview-scope-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--apple-secondary);
  font-size: 11px;
  font-weight: 650;
}

.overview-scope-select select {
  height: 30px;
  min-width: 92px;
  padding: 0 24px 0 9px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--apple-label);
  font-size: 11px;
  font-weight: 650;
}

.overview-scope-select select:disabled {
  color: var(--apple-secondary);
  opacity: 0.72;
}

@media (max-width: 900px) {
  .overview-detail-tools {
    align-items: flex-start;
    justify-content: space-between;
  }

  #groupDetailList {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .group-detail-header-tools {
    justify-content: flex-start;
    gap: 10px;
  }

  .group-detail-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .overview-detail-tools {
    display: grid;
    gap: 8px;
  }

  .overview-scope {
    flex-wrap: wrap;
  }

  #groupDetailList .group-detail-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .group-tab,
  .member-tab,
  .group-kpi-grid > button,
  #groupDetailList .group-detail-row {
    transition: none;
  }
}

#groupDetailList .sku-media {
  gap: 4px;
}

#groupDetailList .sku-thumb,
#groupDetailList .sku-thumb-button {
  width: 40px;
  height: 40px;
}

#groupDetailList .sku-media .status-chip {
  min-width: 40px;
  padding: 2px 5px;
  font-size: 10px;
}

#groupDetailList .group-detail-copy {
  align-self: center;
}

#groupDetailList .label-sku-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

#groupDetailList .group-detail-group,
#groupDetailList .group-detail-member-name {
  flex: none;
  color: #4f5f72;
  font-size: 12px;
  font-weight: 750;
}

#groupDetailList .group-detail-sku {
  min-width: 0;
  color: var(--apple-label);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#groupDetailList .group-detail-group::after {
  content: "-";
  color: #aeaeb2;
  font-weight: 500;
}

#groupDetailList .group-detail-member-name::after {
  content: " · ";
  color: #aeaeb2;
  font-weight: 500;
}

#groupDetailList .label-sku-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#groupDetailList .group-detail-meta {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #66737f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#groupDetailList .group-detail-member {
  align-self: start;
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef5ff;
  color: #386fc2;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  #groupDetailList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #groupDetailList { grid-template-columns: 1fr; }
}

/* Disclosure motion stays interruptible and keeps the dashboard compact. */
#groupKpiDetail {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    grid-template-rows 220ms cubic-bezier(0.23, 1, 0.32, 1),
    opacity 160ms ease-out,
    transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

#groupKpiDetail.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#groupKpiDetail .group-detail-content {
  min-height: 0;
  overflow: hidden;
}

#groupKpiDetail .overview-detail-header {
  margin-bottom: 12px;
}

#groupKpiDetail .overview-detail-header h2 {
  font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
  #groupKpiDetail {
    transition: opacity 160ms ease-out;
    transform: none;
  }
}

/* Compact three-column group detail cards on wide screens. */
#groupDetailList {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#groupDetailList .group-detail-row {
  min-height: 112px;
  grid-template-columns: 56px minmax(0, 1fr) 150px 36px;
  gap: 7px;
  padding: 7px;
}

#groupDetailList .group-detail-group,
#groupDetailList .group-detail-member-name,
#groupDetailList .group-detail-sku {
  color: var(--apple-label);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

#groupDetailList .group-detail-sku {
  overflow: hidden;
  text-overflow: ellipsis;
}

#groupDetailList .group-detail-actions {
  grid-template-columns: minmax(92px, 1fr) minmax(0, 1fr);
  gap: 4px;
  margin-top: 5px;
}

#groupDetailList .group-detail-actions .doc-actions {
  gap: 4px;
}

#groupDetailList .group-detail-actions .doc-actions .row-link-button,
#groupDetailList .group-detail-actions .doc-actions .warehouse-image-button {
  min-width: 0;
  padding: 0 5px;
  font-size: 10px;
}

@media (max-width: 1180px) {
  #groupDetailList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #groupDetailList { grid-template-columns: 1fr; }
}

/* Document-monitor cards use restrained, action-oriented status colors. */
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="all"] {
  background: #eef2f7 !important;
  border-color: #cbd5e1 !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="all"] strong,
#overviewTotalUnuploadedCount { color: #334155 !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="pending"] {
  background: #fff7e8 !important;
  border-color: #f4ddb5 !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="pending"] strong,
#overviewPendingUpload { color: #a16207 !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="notShipped"] {
  background: #f5f7fa !important;
  border-color: #d5dde6 !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="notShipped"] strong,
#overviewNotShippedCount { color: #64748b !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="serious"] {
  background: #fff1ef !important;
  border-color: #ffc7c2 !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="serious"] strong { color: #b42318 !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="overdue"] {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="overdue"] strong { color: #d97706 !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="warning"] {
  background: #fffbeb !important;
  border-color: #fde68a !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="warning"] strong { color: #ca8a04 !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="light"] {
  background: #f7fee7 !important;
  border-color: #d9f99d !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="light"] strong { color: #5f7800 !important; }

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="air"] {
  background: #ecfeff !important;
  border-color: #a5f3fc !important;
}

.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="air"] strong { color: #0e7490 !important; }

/* Keep the document-monitor cards on one neutral surface; color stays on values. */
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail] {
  background: #f5f7fa !important;
  border-color: #d5dde6 !important;
}

/* Apple-style overview: quiet materials, compact hierarchy, and color only for meaning. */
:root {
  --apple-blue: #007aff;
  --apple-green: #34c759;
  --apple-orange: #ff9f0a;
  --apple-red: #ff3b30;
  --apple-label: #1d1d1f;
  --apple-secondary: #6e6e73;
  --apple-fill: rgba(118, 118, 128, 0.12);
  --apple-separator: rgba(60, 60, 67, 0.18);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 58%);
  color: var(--apple-label);
  font-optical-sizing: auto;
}

.app-shell { grid-template-columns: 94px minmax(0, 1fr); }
.sidebar {
  gap: 18px;
  padding: 18px 10px;
  background: rgba(246, 246, 248, 0.84);
  border-right: 1px solid rgba(60, 60, 67, 0.1);
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}
.brand.brand-compact {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border: 1px solid rgba(52, 199, 89, 0.22);
  border-radius: 13px;
  background: linear-gradient(145deg, #ecfff2, #d9f8e3);
  color: #147a36;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.sidebar .nav-list { gap: 6px; }
.sidebar .nav-item {
  height: 62px;
  border: 0;
  border-radius: 12px;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.sidebar .nav-item:hover { background: rgba(118, 118, 128, 0.1); color: #3a3a3c; }
.sidebar .nav-item:active { transform: scale(0.96); }
.sidebar .nav-item.is-active { border: 0; background: rgba(255, 255, 255, 0.86); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); color: var(--apple-label); }
.sidebar .nav-icon { color: var(--apple-blue); }

.main { max-width: 1640px; padding: 24px 28px 38px; }
.topbar {
  min-height: 76px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(60, 60, 67, 0.09);
  border-radius: 18px;
  background: rgba(250, 250, 252, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8);
}
h1 { color: var(--apple-label); font-size: 24px; font-weight: 700; letter-spacing: -0.6px; }
.topbar p { color: var(--apple-secondary); font-size: 13px; }
.toolbar { gap: 10px; }
.status-line,
.refresh-countdown { border: 0; border-radius: 10px; background: var(--apple-fill); color: var(--apple-secondary); font-size: 12px; }
.status-line { min-width: 0; height: 34px; padding: 0 12px; display: flex; align-items: center; }
.refresh-countdown { height: 34px; padding: 0 10px; display: flex; align-items: center; }
.refresh-countdown strong { color: #168345; }
.icon-button { width: 34px; height: 34px; border: 1px solid rgba(60, 60, 67, 0.12); border-radius: 10px; background: rgba(255, 255, 255, 0.9); box-shadow: none; color: var(--apple-blue); }
.icon-button:active { transform: scale(0.95); }

.overview-board { gap: 16px; }
.panel,
.overview-module { border: 1px solid rgba(60, 60, 67, 0.12); border-radius: 18px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.045), inset 0 1px rgba(255, 255, 255, 0.86); }
.overview-module { padding: 16px; }
.overview-module::before { height: 3px; }
.overview-module.shooting-module::before { background: linear-gradient(90deg, var(--apple-blue), var(--apple-green)); }
.overview-module.docs-module::before { background: linear-gradient(90deg, var(--apple-orange), var(--apple-red)); }
.overview-collapse-heading h2,
.panel-header h2 { color: var(--apple-label); font-size: 17px; letter-spacing: -0.3px; }
.overview-collapse-heading p,
.panel-header p { color: var(--apple-secondary); font-size: 12px; }
.module-kpis { gap: 8px; }
.shooting-module .module-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-kpi,
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail] {
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(60, 60, 67, 0.1) !important;
  border-radius: 12px;
  background: rgba(118, 118, 128, 0.075) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.7);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.module-kpi:hover,
.module-kpi.is-active { border-color: rgba(0, 122, 255, 0.62) !important; }
.module-kpi.is-active {
  position: relative;
  border-color: var(--apple-blue) !important;
  background: rgba(118, 118, 128, 0.075) !important;
  box-shadow: inset 0 0 0 2px var(--apple-blue), 0 3px 10px rgba(0, 122, 255, 0.14) !important;
  transform: translateY(-1px);
}
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail]:not(.is-active):not(:hover) {
  background: rgba(118, 118, 128, 0.075) !important;
  border-color: rgba(60, 60, 67, 0.1) !important;
}
.module-kpi:active { transform: scale(0.98); }
.module-kpi span { color: var(--apple-secondary); font-size: 12px; font-weight: 600; }
.module-kpi strong,
.overview-module.docs-module .overview-collapse-summary .module-kpi strong { margin-top: 7px; color: var(--apple-label) !important; font-size: 30px; font-weight: 700; letter-spacing: -0.7px; }
.shooting-module .shoot-card-sample strong,
.shooting-module .shoot-card-ready strong,
.shooting-module .shoot-card-schedule strong,
.shooting-module .shoot-card-capacity strong,
.shooting-module .shoot-card-sale strong,
.shooting-module .shoot-card-daily strong { color: rgb(56, 111, 194) !important; }
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="pending"] strong { color: #a75d00 !important; }
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="serious"] strong { color: var(--apple-red) !important; }
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="overdue"] strong,
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="warning"] strong { color: #b86a00 !important; }
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail="light"] strong { color: #507300 !important; }

.overview-collapsible-detail { margin: 16px -16px -16px; padding: 14px 16px 16px; border-top: 1px solid var(--apple-separator); }
.overview-detail-header { margin-bottom: 12px; }
.badge { height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(52, 199, 89, 0.12); color: #16783c; font-size: 13px; }
.overview-list { gap: 8px; }
.overview-row { min-height: 64px; border: 1px solid rgba(60, 60, 67, 0.16); border-radius: 12px; background: #ffffff; box-shadow: none; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.overview-row:hover { transform: none; border-color: rgba(0, 122, 255, 0.38); background: rgba(0, 122, 255, 0.025); box-shadow: none; }
.overview-row strong { color: var(--apple-label); font-size: 14px; letter-spacing: -0.15px; }
.overview-row div span,
.overview-row > div:nth-child(2) > span,
.overview-row em { color: var(--apple-secondary); font-size: 12px; }
#overviewReadyList .shooting-task-row {
  grid-template-columns: 24px 70px minmax(0, 1fr) 64px 168px 44px;
  column-gap: 10px;
}
#overviewReadyList .shooting-select-control {
  position: relative;
  display: grid;
  width: 24px;
  min-width: 24px;
  place-items: center;
  align-self: center;
  cursor: pointer;
}
#overviewReadyList .shooting-select-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
#overviewReadyList .shooting-select-control span {
  width: 16px;
  height: 16px;
  border: 1px solid #b9c7d4;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}
#overviewReadyList .shooting-select-control input:checked + span {
  border-color: #007aff;
  background: #007aff;
  box-shadow: inset 0 0 0 3px #fff;
}
.doc-select-control {
  position: relative;
  display: grid;
  width: 24px;
  min-width: 24px;
  place-items: center;
  align-self: center;
  cursor: pointer;
}
.doc-select-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.doc-select-control span {
  width: 16px;
  height: 16px;
  border: 1px solid #b9c7d4;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}
.doc-select-control input:checked + span {
  border-color: #007aff;
  background: #007aff;
  box-shadow: inset 0 0 0 3px #fff;
}
.selection-count {
  color: var(--apple-blue);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.select-all-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--apple-secondary);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.select-all-control input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--apple-blue);
}
.batch-action-button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--apple-blue);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.batch-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.batch-status-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 110;
}
.batch-status-modal.is-visible { display: flex; }
.batch-status-card {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.batch-status-header,
.batch-status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--apple-separator);
}
.batch-status-header h2 { margin: 4px 0 0; font-size: 19px; }
.batch-status-body { padding: 16px 20px; overflow: auto; }
.batch-progress-field,
.batch-item label { display: grid; gap: 5px; }
.batch-progress-field { max-width: 260px; }
.batch-progress-field span,
.batch-item label span { color: var(--apple-secondary); font-size: 12px; font-weight: 650; }
.batch-progress-field select,
.batch-item select {
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #c8d7ea;
  border-radius: 8px;
  background: #fff;
  color: var(--apple-label);
  font-size: 13px;
  font-weight: 600;
}
.batch-status-hint { margin: 12px 0; color: var(--apple-secondary); font-size: 12px; }
.batch-unified-grid {
  display: grid;
  grid-template-columns: 120px minmax(130px, 1fr) minmax(220px, 1.6fr) minmax(130px, 1fr);
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #c8d7ea;
  border-radius: 10px;
  background: #f8fbff;
}
.batch-unified-grid[hidden] { display: none; }
.batch-unified-grid label { display: grid; gap: 5px; }
.batch-items { display: grid; gap: 8px; }
.batch-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
}
.batch-item strong { align-self: center; color: var(--apple-label); font-size: 14px; }
.batch-item-product {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.batch-item-product .sku-thumb,
.batch-item-product .sku-thumb-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
.batch-item-product .sku-thumb-empty { font-size: 10px; }
.batch-item-details {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(220px, 1.6fr) minmax(130px, 1fr);
  gap: 10px;
  grid-column: 2;
}
.batch-item-details[hidden] { display: none; }
.batch-status-footer { justify-content: flex-end; border-top: 1px solid var(--apple-separator); border-bottom: 0; }
.batch-status-footer button { min-width: 92px; }
@media (max-width: 640px) {
  .batch-unified-grid { grid-template-columns: 1fr; }
  .batch-unified-spacer { display: none; }
  .batch-item { grid-template-columns: 1fr; }
  .batch-item-product { grid-column: 1 / -1; }
  .batch-item-details { grid-template-columns: 1fr; grid-column: 1; }
}
#overviewReadyList .shooting-task-row .label-sku-line,
#overviewReadyList .shooting-task-row .label-sku-text { display: block; }
#overviewReadyList .shooting-task-row .sku-media .product-photography-type {
  max-width: 68px;
  margin-right: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
#overviewReadyList .shooting-task-row .sku-media {
  transform: translateY(-4px);
}
.transport-warehouse-stack {
  display: grid;
  width: 64px;
  gap: 5px;
  justify-items: center;
  align-content: start;
}
.transport-warehouse-stack .transport-icon { width: 64px; height: 28px; }
.transport-warehouse-stack .warehouse-image-button {
  width: 64px;
  min-height: 34px;
  height: auto;
  padding: 4px 2px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}
.image-preview-overlay { z-index: 130; }
.status-chip { min-width: 52px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 650; }
.sku-thumb,
.sku-thumb-button { border-radius: 9px; }
.photo-status-trigger,
.row-link-button,
.row-action-button { height: 28px; border-radius: 8px; font-size: 11px; font-weight: 600; }

.overview-doc-row {
  min-height: 92px;
  align-items: start;
}

#overviewReadyList .shooting-task-row .transport-warehouse-stack,
#overviewReadyList .shooting-task-row .row-actions {
  align-self: center;
  justify-self: center;
}

#overviewReadyList .shooting-task-row > em,
.overview-doc-row > .row-action-button,
.overview-doc-row > em {
  align-self: center;
  justify-self: center;
}

/* The two overview columns share one fixed summary height, so their lists align. */
@media (min-width: 1101px) {
  .overview-collapse-summary {
    height: 282px;
    min-height: 282px;
    box-sizing: border-box;
  }
}


@media (max-width: 1100px) { .app-shell { grid-template-columns: 78px minmax(0, 1fr); } .main { padding: 18px; } .topbar { align-items: flex-start; } }
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; flex-direction: row; height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--apple-separator); }
  .brand.brand-compact { width: 40px; height: 40px; min-height: 40px; }
  .sidebar .nav-list { display: flex; }
  .sidebar .nav-item { width: 74px; height: 42px; grid-template-columns: auto 1fr; }
  .main { padding: 12px; }
  .topbar { display: grid; gap: 12px; padding: 15px; border-radius: 14px; }
  .toolbar { flex-wrap: wrap; }
  .sku-search { width: 100%; }
  .sku-search input { flex: 1; width: auto; }
  .shooting-module .module-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-transparency: reduce) { .sidebar, .topbar { background: #f5f5f7; backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Keep the selected state identical across shooting and document modules. */
.overview-collapse-summary .module-kpi.is-active,
.overview-module.docs-module .overview-collapse-summary .module-kpi[data-doc-detail].is-active {
  border-color: var(--apple-blue) !important;
  background: rgba(118, 118, 128, 0.075) !important;
  box-shadow: inset 0 0 0 2px var(--apple-blue), 0 3px 10px rgba(0, 122, 255, 0.14) !important;
}

/* Final compact-card sizing after the dashboard-wide responsive rules. */
#groupDetailList {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#groupDetailList .group-detail-row {
  min-height: 128px;
  grid-template-columns: 56px minmax(0, 1fr) 150px 36px;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  border-color: rgba(60, 60, 67, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
}

#groupDetailList .group-detail-group,
#groupDetailList .group-detail-member-name,
#groupDetailList .group-detail-sku {
  font-size: 13px;
  font-weight: 760;
}

#groupDetailList .group-detail-meta {
  min-width: 0;
  margin-top: 1px;
  font-size: 11px;
}

#groupDetailList .group-detail-meta-row {
  display: block;
}

.product-photography-type {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  padding: 1px 4px;
  border: 1px solid #d5dee5;
  border-radius: 4px;
  background: #f3f6f8;
  color: #5f7183;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.product-photography-type-large {
  border-color: #ead9b7;
  background: #fbf5e8;
  color: #9a6b24;
}

.product-photography-type-wear {
  border-color: #e7cbd4;
  background: #fbf2f5;
  color: #9b5c72;
}

.product-photography-type-plant {
  border-color: #cfe2d6;
  background: #f1f7f3;
  color: #4f7b65;
}

.product-photography-type-single {
  border-color: #d5dee5;
  background: #f3f6f8;
  color: #5f7183;
}

.overview-row .product-photography-type-large { color: #9a6b24; }
.overview-row .product-photography-type-wear { color: #9b5c72; }
.overview-row .product-photography-type-plant { color: #4f7b65; }
.overview-row .product-photography-type-single { color: #5f7183; }

#groupDetailList .group-detail-actions {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, 28px);
  align-content: center;
  align-self: stretch;
  gap: 3px;
  height: 100%;
  min-width: 0;
  margin-top: 0;
}

#groupDetailList .group-detail-actions .doc-actions {
  display: contents;
}

#groupDetailList .group-detail-actions .photo-status-trigger {
  grid-column: 1 / -1;
  grid-row: 1;
}

#groupDetailList .group-detail-actions .group-detail-doc-actions [data-doc-preview] {
  grid-column: 1;
  grid-row: 2;
}

#groupDetailList .group-detail-actions .group-detail-doc-actions [data-doc-download] {
  grid-column: 2;
  grid-row: 2;
}

#groupDetailList .group-detail-actions .group-detail-doc-actions .warehouse-image-button {
  grid-column: 1 / -1;
  grid-row: 3;
}

#groupDetailList .group-detail-actions .doc-actions .row-link-button,
#groupDetailList .group-detail-actions .doc-actions .warehouse-image-button {
  width: 100%;
  min-width: 0;
  min-height: 22px;
  padding: 0 4px;
  font-size: 10px;
}

#groupDetailList .group-detail-actions .photo-status-trigger {
  width: 100%;
  min-height: 24px;
  padding: 0 6px;
  font-size: 10px;
}

#groupDetailList .group-detail-side {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  align-content: center;
  justify-items: end;
  min-width: 0;
}

#groupDetailList .group-detail-shipment-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  width: 28px;
  min-height: 84px;
  padding: 4px 5px;
  border-radius: 6px;
  background: transparent;
  color: #40546b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

#groupDetailList .group-detail-shipment-age strong {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  letter-spacing: 0;
}

@media (max-width: 1180px) {
  #groupDetailList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #groupDetailList { grid-template-columns: 1fr; }
  #groupDetailList .group-detail-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  #groupDetailList .group-detail-actions,
  #groupDetailList .group-detail-side {
    grid-column: 2;
    grid-row: auto;
  }
}
