/* gc-dashboard-v6: 管理员经营 Dashboard（Shadcn 一体式页面框架 / 表头 / 状态 / 分页） */
.dash-page.gc-ops-dashboard {
  width: min(100%, 1540px);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e7ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  color: var(--ink-strong, #111318);
}

.gc-ops-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  height: 48px;
  padding: 0 24px;
  margin: 0;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, .78);
}

.gc-ops-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gc-ops-sidebar-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-left: -4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}

.gc-ops-sidebar-trigger:hover { background: #f2f4f7; color: #101828; }
.gc-ops-sidebar-trigger:focus-visible { outline: 2px solid rgba(25, 103, 210, .28); outline-offset: 2px; }
.gc-ops-sidebar-trigger img { width: 16px; height: 16px; }

.gc-ops-head-separator {
  width: 1px;
  height: 16px;
  margin: 0 8px;
  background: #e4e7ec;
}

.gc-ops-head .dash-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.gc-ops-body {
  padding: 24px 30px 64px;
  background: #fff;
}

.gc-ops-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.gc-ops-card {
  min-height: 150px;
  padding: 20px 20px 17px;
  border: 1px solid #e2e7ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  display: flex;
  flex-direction: column;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.gc-ops-card:hover {
  border-color: #cbd7e8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.gc-ops-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gc-ops-card-label {
  color: #7a8494;
  font-size: 12.5px;
  font-weight: 560;
}

.gc-ops-change {
  max-width: 112px;
  padding: 3px 8px;
  border: 1px solid #dfe5ee;
  border-radius: 999px;
  color: #475467;
  background: rgba(255, 255, 255, .8);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.gc-ops-change.up { color: #067647; border-color: #b7e4ce; background: #f2fbf6; }
.gc-ops-change.down { color: #b42318; border-color: #f2c7c3; background: #fff7f6; }
.gc-ops-change.info { color: #175cd3; border-color: #c9daf8; background: #f5f8ff; }

.gc-ops-card-value {
  margin-top: 10px;
  color: #101828;
  font-size: clamp(27px, 2.2vw, 34px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}

.gc-ops-card-value .currency {
  margin-right: 4px;
  color: #344054;
  font-size: .55em;
  font-weight: 650;
  vertical-align: 22%;
}

.gc-ops-card-primary {
  margin-top: auto;
  padding-top: 18px;
  color: #344054;
  font-size: 12.5px;
  font-weight: 620;
}

.gc-ops-card-secondary {
  margin-top: 4px;
  color: #98a2b3;
  font-size: 11.5px;
}

.gc-ops-panel {
  border: 1px solid #e1e6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .02);
}

.gc-ops-chart-panel {
  margin-bottom: 18px;
  padding: 20px 22px 14px;
}

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

.gc-ops-panel-title {
  margin: 0;
  color: #1d2939;
  font-size: 16px;
  font-weight: 700;
}

.gc-ops-panel-sub {
  margin-top: 5px;
  color: #98a2b3;
  font-size: 12px;
}

.gc-ops-chart-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gc-ops-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #667085;
  font-size: 11.5px;
}

.gc-ops-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.gc-ops-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1677ff;
}

.gc-ops-legend .ship i { background: #12a46d; }

.gc-ops-range {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  background: #fff;
}

.gc-ops-range button {
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid #e4e7ec;
  background: transparent;
  color: #475467;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}

.gc-ops-range button:last-child { border-right: 0; }
.gc-ops-range button:hover { background: #f7f9fc; }
.gc-ops-range button.active { background: #eef4ff; color: #175cd3; font-weight: 650; }

.gc-ops-range-select {
  display: none;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 12px;
}

.gc-ops-chart-wrap {
  position: relative;
  height: 286px;
  min-height: 240px;
  overflow: hidden;
  border-top: 1px solid #edf0f4;
}

.gc-ops-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.gc-ops-chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 156px;
  padding: 9px 11px;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  color: #344054;
  font-size: 11.5px;
  line-height: 1.65;
  pointer-events: none;
  transform: translate(-50%, -108%);
}

.gc-ops-chart-tooltip[hidden] { display: none; }
.gc-ops-chart-tooltip strong { display: block; color: #101828; font-size: 12px; }
.gc-ops-chart-tooltip .order { color: #175cd3; }
.gc-ops-chart-tooltip .ship { color: #067647; }

.gc-ops-table-shell { padding: 0; overflow: visible; }

.gc-ops-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
}

.gc-ops-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 9px;
  background: #f4f4f5;
}

.gc-ops-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.gc-ops-tabs button:hover { color: #344054; }
.gc-ops-tabs button.active { border-color: #d9dee7; background: #fff; color: #101828; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.gc-ops-tabs .count { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #e4e4e7; color: #52525b; font-size: 10px; text-align: center; }
.gc-ops-tabs button.active .count { background: #e4e4e7; color: #3f3f46; }

.gc-ops-columns { position: relative; }

.gc-ops-columns-btn {
  height: 34px;
  padding: 0 11px;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.gc-ops-columns-btn:hover { background: #f8fafc; }

.gc-ops-column-menu {
  position: absolute;
  z-index: 9;
  top: calc(100% + 6px);
  right: 0;
  width: 180px;
  padding: 7px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .13);
}

.gc-ops-column-menu[hidden] { display: none; }
.gc-ops-column-menu label { display: flex; align-items: center; gap: 8px; min-height: 31px; padding: 0 7px; border-radius: 6px; color: #475467; font-size: 12px; cursor: pointer; }
.gc-ops-column-menu label:hover { background: #f6f8fb; }
.gc-ops-column-menu input { accent-color: #1677ff; }

.gc-ops-table-scroll {
  overflow-x: auto;
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
}

.gc-ops-table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
  table-layout: fixed;
}

.gc-ops-table th {
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid #dfe4eb;
  background: #f8f9fb;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.gc-ops-table th button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.gc-ops-table th button:hover { color: #175cd3; }

.gc-ops-table td {
  height: 50px;
  padding: 7px 14px;
  border-bottom: 1px solid #edf0f4;
  color: #344054;
  font-size: 12px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-ops-table tbody tr:last-child td { border-bottom: 0; }
.gc-ops-table tbody tr { cursor: pointer; transition: background .12s ease; }
.gc-ops-table tbody tr:hover { background: #f8fbff; }
.gc-ops-table .po-link { color: #175cd3; font-weight: 650; }
.gc-ops-table .sku { color: #101828; font-weight: 620; }
.gc-ops-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.gc-ops-table .muted { color: #98a2b3; }
.gc-ops-table [data-col][hidden] { display: none; }

.gc-ops-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px 0 6px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  font-size: 10.5px;
  font-weight: 620;
}

.gc-ops-status-icon { width: 14px; height: 14px; flex: 0 0 14px; }
.gc-ops-status.overdue { border-color: #efc4c0; color: #b42318; }
.gc-ops-status.soon { border-color: #f1d19a; color: #b54708; }
.gc-ops-status.shipped { color: #344054; }
.gc-ops-status.missing { border-color: #cbd8ec; color: #175cd3; }

.gc-ops-table-empty {
  padding: 42px 20px !important;
  color: #98a2b3 !important;
  text-align: center;
}

.gc-ops-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 10px 16px;
  color: #667085;
  font-size: 11.5px;
}

.gc-ops-table-count { flex: 1 1 auto; }
.gc-ops-pagination { display: flex; align-items: center; gap: 28px; color: #344054; }
.gc-ops-page-size { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.gc-ops-page-size label { font-size: 12px; font-weight: 600; }
.gc-ops-page-size select {
  width: 88px;
  min-width: 88px;
  height: 32px;
  padding: 0 32px 0 12px;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background-color: #fff;
  color: #344054;
  font: inherit;
  line-height: 30px;
  text-indent: 0;
  cursor: pointer;
}
.gc-ops-page-text { min-width: 72px; color: #101828; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gc-ops-page-actions { display: flex; align-items: center; gap: 8px; }
.gc-ops-page-actions button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid #dfe4eb; border-radius: 8px; background: #fff; color: #475467; font: inherit; cursor: pointer; }
.gc-ops-page-actions button img { width: 16px; height: 16px; }
.gc-ops-page-icon.is-right { transform: rotate(180deg); }
.gc-ops-page-actions button:hover:not(:disabled) { border-color: #b9c7dc; background: #f8fafc; color: #101828; }
.gc-ops-page-actions button:disabled { opacity: .42; cursor: default; }

@media (max-width: 1180px) {
  .gc-ops-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .dash-page.gc-ops-dashboard { padding: 0; }
  .gc-ops-head { padding: 0 16px; }
  .gc-ops-body { padding: 20px 16px 84px; }
  .gc-ops-panel-head { align-items: stretch; flex-direction: column; }
  .gc-ops-chart-actions { justify-content: space-between; }
  .gc-ops-chart-wrap { height: 250px; }
  .gc-ops-table-toolbar { align-items: stretch; flex-direction: column; }
  .gc-ops-tabs { width: 100%; overflow-x: auto; }
  .gc-ops-tabs button { flex: 0 0 auto; }
  .gc-ops-columns { align-self: flex-end; }
  .gc-ops-pagination { gap: 14px; }
  .gc-ops-table-count { display: none; }
}

@media (max-width: 640px) {
  .gc-ops-card-grid { grid-template-columns: 1fr; }
  .gc-ops-card { min-height: 138px; }
  .gc-ops-range { display: none; }
  .gc-ops-range-select { display: block; }
  .gc-ops-legend { align-items: flex-start; flex-direction: column; gap: 3px; }
  .gc-ops-chart-panel { padding: 17px 14px 10px; }
  .gc-ops-chart-wrap { height: 230px; }
  .gc-ops-table-footer { align-items: stretch; }
  .gc-ops-pagination { width: 100%; justify-content: space-between; }
  .gc-ops-page-size label { display: none; }
  #gcOpsFirstPage, #gcOpsLastPage { display: none; }
}

@media (max-width: 900px) {
  .gc-ops-sidebar-trigger,
  .gc-ops-head-separator { display: none; }
}

/* dashboard-account-menu-fix-v9: 展开态不创建 transform 容器，避免裁掉侧栏账号菜单。 */
/* admin-ops-dashboard-v8:
   管理员 Dashboard 使用 off-canvas 收缩；普通 ERP 页面仍保留 64px 图标栏。 */
@media (min-width: 901px) {
  body.gc-admin-shell-pilot.dashboard-tab-active .sidebar {
    transform: none;
    transition: width 200ms ease-linear, transform 200ms ease-linear;
  }

  body.gc-admin-shell-pilot.dashboard-tab-active.sidebar-collapsed .sidebar {
    transform: translate3d(-100%, 0, 0);
    pointer-events: none;
  }

  body.gc-admin-shell-pilot.dashboard-tab-active.sidebar-collapsed .content-area {
    width: 100% !important;
    margin-left: 0 !important;
  }

  body.gc-admin-shell-pilot.dashboard-tab-active.sidebar-collapsed .dash-page.gc-ops-dashboard {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.gc-admin-shell-pilot.dashboard-tab-active.sidebar-collapsed .sidebar-collapsed-tooltip {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.gc-admin-shell-pilot.dashboard-tab-active .sidebar,
  body.gc-admin-shell-pilot.dashboard-tab-active .content-area {
    transition: none !important;
  }
}
