/* CommerceFlow r8.0.0 — page-level enterprise harmonization */
body.cf-v8 .card,
body.cf-v8 .r73-data-panel,
body.cf-v8 .r73-form-panel,
body.cf-v8 .r73-edit-panel,
body.cf-v8 .r73-rules-panel,
body.cf-v8 .r73-disclosure,
body.cf-v8 .r75-package-editor,
body.cf-v8 .platform-page .card,
body.cf-v8 .report-kpi,
body.cf-v8 .kpi,
body.cf-v8 .mini-panel { border-radius: var(--cf-radius-1) !important; box-shadow: none !important; }

/* Dashboard and work queues */
body.cf-v8 .executive-header,
body.cf-v8 .dashboard-hero,
body.cf-v8 .operations-hero { border: 1px solid var(--cf-line); border-left: 4px solid var(--cf-blue); border-radius: var(--cf-radius-1); background: var(--cf-white); box-shadow: none; }
body.cf-v8 .priority-item,
body.cf-v8 .bridge-row { border: 0; border-bottom: 1px solid var(--cf-line); border-radius: 0; background: transparent; box-shadow: none; }
body.cf-v8 .priority-item:last-child,
body.cf-v8 .bridge-row:last-child { border-bottom: 0; }

/* SHEIN and customer order registers */
body.cf-v8 .r74-shein-order-table { min-width: 1180px; table-layout: fixed; }
body.cf-v8 .r74-shein-order-table th:nth-child(1) { width: 148px; }
body.cf-v8 .r74-shein-order-table th:nth-child(2) { width: 92px; }
body.cf-v8 .r74-shein-order-table th:nth-child(3) { width: 104px; }
body.cf-v8 .r74-shein-order-table th:nth-child(4),
body.cf-v8 .r74-shein-order-table th:nth-child(5) { width: 78px; }
body.cf-v8 .r74-shein-order-table th:nth-child(6),
body.cf-v8 .r74-shein-order-table th:nth-child(7) { width: 112px; }
body.cf-v8 .r74-shein-order-table th:nth-child(8) { width: 154px; }
body.cf-v8 .r74-shein-order-table th:nth-child(9) { width: 92px; }
body.cf-v8 .r74-shein-order-table th:last-child { width: 224px; }
body.cf-v8 .r74-shein-order-table .cf-row-action-group {
  width: 100%; display: grid; grid-template-columns: minmax(96px,1fr) minmax(88px,1fr); gap: 5px; align-items: stretch;
}
body.cf-v8 .r74-shein-order-table .cf-row-action-group > * { min-width: 0; width: 100%; margin: 0; }
body.cf-v8 .r74-shein-order-table .cf-row-action {
  min-width: 0; width: 100%; min-height: 32px; padding: 5px 7px; border-radius: var(--cf-radius-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px;
}
body.cf-v8 .r74-shein-order-table .cf-row-action.primary { color: var(--cf-white); background: var(--cf-ink-2); border-color: var(--cf-ink-2); }
body.cf-v8 .r74-shein-order-table .cf-row-action b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: var(--cf-radius-1); background: rgba(255,255,255,.17); font-size: 10px; }
body.cf-v8 .r74-shein-order-table th:last-child,
body.cf-v8 .r74-shein-order-table td:last-child,
body.cf-v8 .r74-customer-order-table th:last-child,
body.cf-v8 .r74-customer-order-table td:last-child { box-shadow: -8px 0 16px -15px rgba(9,24,39,.7); }
body.cf-v8 .cf-order-identifier strong { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cf-v8 .cf-order-identifier small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Platform portfolio and details */
body.cf-v8 .tenant-portfolio-details > summary { min-height: 38px; padding: 8px 12px; border-radius: 0; color: var(--cf-blue); background: var(--cf-cloud); }
body.cf-v8 .tenant-portfolio-details[open] > summary { border-bottom: 1px solid var(--cf-line); background: #e7f0f5; }
body.cf-v8 .tenant-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 12px; background: #f8fafb; }
body.cf-v8 .tenant-detail-grid > section,
body.cf-v8 .tenant-detail-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--cf-line); border-radius: var(--cf-radius-1); background: var(--cf-white); box-shadow: none; }
body.cf-v8 .tenant-detail-grid dl { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 5px 10px; margin: 0 0 12px; }
body.cf-v8 .tenant-detail-grid dt { color: var(--cf-text-muted); font-size: 11.5px; }
body.cf-v8 .tenant-detail-grid dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
body.cf-v8 .review-count-link { min-width: 28px; height: 28px; border-radius: var(--cf-radius-1); color: var(--cf-blue); background: var(--cf-info-bg); }
body.cf-v8 .review-count-link:hover { color: var(--cf-white); background: var(--cf-blue); }

/* Reports */
body.cf-v8 .platform-report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
body.cf-v8 .platform-report-grid > * { border-radius: var(--cf-radius-1) !important; box-shadow: none !important; }
body.cf-v8 .report-drilldown-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
body.cf-v8 .report-anchor-section { scroll-margin-top: 64px; }
body.cf-v8 .report-chart,
body.cf-v8 .chart-panel { border: 1px solid var(--cf-line); border-radius: var(--cf-radius-1); background: var(--cf-white); box-shadow: none; }

/* Settings and financial pages */
body.cf-v8 .capital-location,
body.cf-v8 .account-capability,
body.cf-v8 .settings-card,
body.cf-v8 .money-location { border: 1px solid var(--cf-line); border-radius: var(--cf-radius-1); background: var(--cf-white); box-shadow: none; }
body.cf-v8 .capital-location-heading { border-bottom: 1px solid var(--cf-line); background: var(--cf-cloud); }

/* Authentication management overlay: remove old large rounded treatment. */
body.cf-v8.cf-platform .cf-admin-manager[open] .admin-actions-panel { border-radius: var(--cf-radius-2) !important; box-shadow: var(--cf-shadow-dialog) !important; }
body.cf-v8.cf-platform .admin-actions-header { background: var(--cf-cloud); }

@media (max-width: 1100px) {
  body.cf-v8 .tenant-detail-grid { grid-template-columns: 1fr; }
  body.cf-v8 .platform-report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body.cf-v8 .r73-data-panel,
  body.cf-v8 .r73-form-panel,
  body.cf-v8 .r73-edit-panel,
  body.cf-v8 .r73-rules-panel,
  body.cf-v8 .r73-disclosure,
  body.cf-v8 .r75-package-editor,
  body.cf-v8 .card { border-radius: var(--cf-radius-1) !important; box-shadow: none !important; }
  body.cf-v8 .r73-notice,
  body.cf-v8 .r73-filter-bar,
  body.cf-v8 .r75-customer-filter,
  body.cf-v8 .r75-package-filter,
  body.cf-v8 .r74-delivery-filters,
  body.cf-v8 .r74-gift-filter { border-radius: var(--cf-radius-1) !important; box-shadow: none !important; }
}

/* CommerceFlow r8.0.1 — dashboard and page rhythm correction */
body.cf-v8.cf-workspace .dashboard-hero,
body.cf-v8.cf-workspace .r73-page-header,
body.cf-v8.cf-workspace .page-header,
body.cf-v8.cf-platform .platform-heading {
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 2px solid var(--cf-ink-2) !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.cf-v8.cf-workspace .dashboard-hero { align-items: flex-end !important; }
body.cf-v8.cf-workspace .executive-kpis {
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 0 !important;
  margin: 0 0 16px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-1) !important;
  overflow: hidden !important;
  background: var(--cf-white) !important;
  box-shadow: none !important;
}
body.cf-v8.cf-workspace .executive-kpi {
  position: relative !important;
  min-height: 92px !important;
  padding: 13px 15px !important;
  border: 0 !important;
  border-right: 1px solid var(--cf-line) !important;
  border-radius: 0 !important;
  background: var(--cf-white) !important;
  box-shadow: none !important;
}
body.cf-v8.cf-workspace .executive-kpi:last-child { border-right: 0 !important; }
body.cf-v8.cf-workspace .executive-kpi::before { display: none !important; content: none !important; }
body.cf-v8.cf-workspace .executive-kpi .kpi-top { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 8px !important; color: var(--cf-text-muted) !important; font-size: 11.5px !important; }
body.cf-v8.cf-workspace .executive-kpi .metric-icon {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--cf-blue) !important;
  background: transparent !important;
  font-family: var(--cf-font-mono) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}
body.cf-v8.cf-workspace .executive-kpi > strong { margin: 11px 0 3px !important; color: var(--cf-ink) !important; font-size: 23px !important; line-height: 1 !important; }
body.cf-v8.cf-workspace .executive-kpi > small { color: var(--cf-text-muted) !important; font-size: 10.5px !important; }
body.cf-v8 .card-header,
body.cf-v8 .r73-panel-header,
body.cf-v8 .cf-form-card-header { border-radius: 0 !important; }
body.cf-v8 .section-kicker,
body.cf-v8 .eyebrow { color: var(--cf-blue) !important; font-size: 10px !important; font-weight: 800 !important; letter-spacing: .09em !important; text-transform: uppercase !important; }

@media (max-width: 920px) {
  body.cf-v8.cf-workspace .executive-kpis { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.cf-v8.cf-workspace .executive-kpi:nth-child(2) { border-right: 0 !important; }
  body.cf-v8.cf-workspace .executive-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--cf-line) !important; }
}
@media (max-width: 560px) {
  body.cf-v8.cf-workspace .executive-kpis { grid-template-columns: 1fr !important; }
  body.cf-v8.cf-workspace .executive-kpi { min-height: 78px !important; border-right: 0 !important; border-bottom: 1px solid var(--cf-line) !important; }
  body.cf-v8.cf-workspace .executive-kpi:last-child { border-bottom: 0 !important; }
}
