/* Cashback Pro V36.7.50 — one global customer cashback share + medium desktop split layout. */

.commission-global-editor {
  display: grid;
  gap: 7px;
  width: min(100%, 520px);
  margin: 10px 0 14px;
  padding: 12px 14px;
  box-sizing: border-box;
  border: 1px solid var(--border-color, rgba(148,163,184,.32));
  border-radius: 12px;
  background: var(--bg-surface-2, rgba(20,28,48,.72));
}
.commission-global-editor.hidden { display: none !important; }
.commission-global-editor > label {
  display: block;
  color: var(--text-main, inherit);
  font-size: 13px;
  font-weight: 800;
}
.commission-global-editor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.commission-global-editor-row input {
  width: 112px;
  min-width: 96px;
  max-width: 100%;
  flex: 0 0 112px;
  font-variant-numeric: tabular-nums;
}
.commission-global-editor-row span {
  min-width: 0;
  color: var(--text-muted, #718096);
  font-size: 12px;
  line-height: 1.45;
}
.commission-global-editor > p {
  margin: 0;
  color: var(--text-muted, #718096);
  font-size: 12px;
  line-height: 1.5;
}
#commission-bulk-save:not(.hidden) {
  display: inline-flex !important;
  animation: commissionSaveIn .16s ease-out;
}
@media (max-width: 560px) {
  .commission-global-editor { width: 100%; }
  .commission-global-editor-row { align-items: flex-start; flex-wrap: wrap; }
}

/* Medium/windowed desktop: reserve a real column for the sidebar.
   This prevents the fixed rail from covering page content when Chrome is not maximized. */
@media screen and (min-width: 761px) and (max-width: 1180px) {
  :root { --v50-sidebar-width: clamp(184px, 22vw, 220px); }

  html body #app-sidebar.app-sidebar {
    width: var(--v50-sidebar-width) !important;
    min-width: var(--v50-sidebar-width) !important;
    max-width: var(--v50-sidebar-width) !important;
    left: 8px !important;
    right: auto !important;
    box-sizing: border-box !important;
  }

  html body .main-container,
  html body.dashboard-home .main-container,
  html body.dashboard-tab-mode .main-container {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 12px 12px 24px max(244px, calc(var(--v50-sidebar-width) + 48px)) !important;
    padding: 12px 10px 24px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
  }

  html body.sidebar-collapsed .main-container,
  html body.dashboard-home.sidebar-collapsed .main-container,
  html body.dashboard-tab-mode.sidebar-collapsed .main-container {
    margin-left: 12px !important;
  }
}
