/* Team compensation uses the dashboard's Paper, ink, mint, and Figtree tokens. */
body.pro-mode .rl-comp-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  color: var(--color-ink, #172b2a);
  font-family: var(--font-sans);
}
.rl-comp-section-heading p,
.rl-comp-editor header p {
  margin: 0;
  color: var(--color-muted, #60736d);
  font-size: 0.85rem;
  line-height: 1.5;
}
.rl-comp-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  --comp-control-height: 32px;
}
.rl-comp-period-mode {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 204px;
  flex: 0 0 204px;
  box-sizing: border-box;
  padding: 2px;
  height: var(--comp-control-height);
  border: 1px solid var(--color-line, #e2ece8);
  border-radius: 8px;
  background: #eff2ee;
}
.rl-comp-period-mode::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px auto 2px 2px;
  width: calc((100% - 4px) / 3);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 3px #172b2a12;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.rl-comp-period-mode[data-active="quarter"]::before {
  transform: translateX(100%);
}
.rl-comp-period-mode[data-active="year"]::before {
  transform: translateX(200%);
}
body.pro-mode .rl-comp-controls .rl-comp-period-mode > button {
  min-width: 0;
  min-height: 0 !important;
  height: 100%;
  padding: 0 9px !important;
  border: 0;
  border-radius: 5px;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 0.75rem !important;
  font-weight: 500;
  color: #60736d;
  cursor: pointer;
  transition: color 180ms ease;
}
body.pro-mode
  .rl-comp-controls
  .rl-comp-period-mode
  > button[aria-pressed="true"] {
  color: #172b2a;
}
.rl-comp-filter {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.rl-comp-controls > .rl-comp-filter {
  flex: 0 0 96px;
  width: 96px;
}
body.pro-mode
  .dashboard-shell
  .dashboard-content
  .rl-comp-filter
  :is(select, .prelook-select-trigger) {
  box-sizing: border-box;
  min-height: var(--comp-control-height) !important;
  height: var(--comp-control-height) !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  border: 1px solid #dbe4df;
  border-radius: 8px !important;
  background: #fff;
  color: #172b2a;
  font: inherit;
  font-size: 0.75rem !important;
  line-height: 1.2;
}
.rl-comp-filter .prelook-select-shell {
  width: 100%;
  min-width: 0;
}
body.pro-mode .rl-comp-filter .prelook-select-chevron {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.rl-comp-period-slot {
  position: relative;
  width: 154px;
  flex: 0 0 auto;
  height: var(--comp-control-height);
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.rl-comp-controls[data-period-mode="year"] .rl-comp-period-slot {
  width: 0;
}
.rl-comp-period-field {
  position: absolute;
  inset: 0;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}
.rl-comp-period-field[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
}
.rl-comp-field {
  display: grid;
  gap: 6px;
  min-width: 125px;
  margin: 0;
}
.rl-comp-field > span {
  font-size: 0.74rem;
  color: #60736d;
  font-weight: 500;
}
.rl-comp-field :is(input, select) {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe4df;
  border-radius: 9px;
  background: #fff;
  color: #172b2a;
  padding: 9px 11px;
  font: inherit;
  font-size: 0.85rem;
}
.rl-comp-field input:focus-visible,
.rl-comp-period-mode button:focus-visible,
.rl-comp-table-scroll:focus-visible {
  outline: 2px solid #27745e;
  outline-offset: 3px;
}
.rl-comp-range {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rl-comp-range p {
  font-size: 0.78rem;
  font-weight: 500;
  margin: 0;
}
.rl-comp-range > span {
  color: #60736d;
  font-size: 0.7rem;
}
.rl-comp-results {
  display: grid;
  gap: 14px;
  min-width: 0;
  transition: opacity 180ms ease;
}
.rl-comp-results[aria-busy="true"] {
  opacity: 0.66;
}
.rl-comp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}
.rl-comp-kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--color-line, #e2ece8);
  border-radius: 14px;
  min-width: 0;
}
.rl-comp-kpi > span {
  font-size: 0.78rem;
  color: #60736d;
}
.rl-comp-kpi > strong {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 550;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.rl-comp-kpi.is-total {
  background: #eaf5ee;
  border-color: #d3e7d9;
}
.rl-comp-table-panel {
  background: #fff;
  border: 1px solid var(--color-line, #e2ece8);
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
}
.rl-comp-table-scroll {
  overflow: auto;
  min-width: 0;
  max-width: 100%;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.rl-comp-table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.rl-comp-table :is(th, td) {
  text-align: right;
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #edf0ed;
  white-space: nowrap;
}
.rl-comp-table th:first-child {
  text-align: left;
}
.rl-comp-table thead th {
  font-weight: 500;
  color: #60736d;
  font-size: 0.74rem;
  line-height: 1.45;
  background: #fafbf9;
}
.rl-comp-table tbody tr {
  transition: background 140ms ease;
}
.rl-comp-table tbody tr:hover {
  background: #f7faf7;
}
.rl-comp-table tfoot :is(th, td) {
  background: #f1f6f1;
  font-weight: 600;
  border-bottom: 0;
}
.rl-comp-stylist {
  display: grid;
  gap: 5px;
  text-align: left;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #172b2a;
}
.rl-comp-stylist strong {
  font-weight: 600;
}
.rl-comp-stylist small {
  color: #68786d;
  font-size: 0.71rem;
  font-weight: 400;
}
.rl-comp-stylist:hover strong {
  color: #236c59;
}
.rl-comp-total {
  font-weight: 600;
}
.rl-comp-notice {
  margin: 0;
  padding: 12px 15px;
  background: #fbf5e8;
  color: #78633b;
  border: 1px solid #eee1c4;
  border-radius: 9px;
  font-size: 0.8rem;
  line-height: 1.55;
}
.rl-comp-notice.is-error {
  background: #fff0ef;
  color: #944b46;
  border-color: #eed3d0;
}
.rl-comp-notice button {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}
.rl-comp-footnote {
  color: #6a796f;
  font-size: 0.75rem;
  line-height: 1.6;
  margin: 0;
}
.rl-comp-empty {
  padding: 34px 20px !important;
  text-align: center !important;
  color: #60736d;
  font-weight: 400;
  font-size: 0.82rem;
}
.rl-comp-detail {
  display: grid;
  gap: 26px;
  padding-bottom: 20px;
  min-width: 0;
}
.rl-comp-detail .rl-comp-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.rl-comp-detail .rl-comp-kpi {
  padding: 15px;
  gap: 10px;
}
.rl-comp-detail-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: #60736d;
}
.rl-comp-incomplete,
.rl-comp-complete {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #faf0d8;
  color: #7a622e;
  font-size: 0.72rem;
}
.rl-comp-complete {
  background: #e8f5ec;
  color: #236c59;
}
.rl-comp-section-heading {
  margin-bottom: 15px;
}
.rl-comp-section-heading h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}
.rl-comp-week {
  border: 1px solid #e2e8e2;
  border-radius: 10px;
  background: #fff;
  margin-top: 8px;
  overflow: hidden;
}
.rl-comp-week > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  list-style: none;
  cursor: pointer;
  font-size: 0.8rem;
}
.rl-comp-week > summary::-webkit-details-marker {
  display: none;
}
.rl-comp-week > summary > span {
  display: grid;
  gap: 5px;
}
.rl-comp-week > summary > span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.rl-comp-week > summary strong {
  font-weight: 500;
}
.rl-comp-week > summary small {
  color: #758276;
}
.rl-comp-week > summary::after {
  content: "+";
  color: #60736d;
  font-size: 18px;
  transition: transform 180ms ease;
}
.rl-comp-week[open] > summary::after {
  transform: rotate(45deg);
}
.rl-comp-week-body {
  padding: 0 15px 15px;
}
.rl-comp-week[open] .rl-comp-week-body {
  animation: rl-comp-reveal 200ms ease both;
}
.rl-comp-week dl {
  display: grid;
  gap: 9px;
  font-size: 0.78rem;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid #edf0ed;
}
.rl-comp-week dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.rl-comp-week dt {
  color: #60736d;
}
.rl-comp-week dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.rl-comp-week .is-total {
  font-weight: 600;
}
.rl-comp-rate-calculations {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  border-top: 1px solid #edf0ed;
  display: grid;
  gap: 10px;
}
.rl-comp-rate-calculations li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
}
.rl-comp-rate-calculations small {
  display: block;
  margin-top: 4px;
  color: #758276;
  font-size: 0.7rem;
}
.rl-comp-table.is-detail {
  min-width: 490px;
  font-size: 0.76rem;
}
.rl-comp-table.is-detail :is(th, td) {
  padding: 12px 9px;
}
.rl-comp-table.is-detail th > :is(strong, small) {
  display: block;
}
.rl-comp-table.is-detail th > strong {
  font-weight: 500;
}
.rl-comp-table.is-detail th > small {
  margin-top: 5px;
  font-size: 0.68rem;
  color: #758276;
  font-weight: 400;
}
.rl-comp-editor {
  display: grid;
  gap: 16px;
  padding: 20px;
  margin-block: 4px;
  border: 1px solid #e2e8e2;
  border-radius: 13px;
  background: #fff;
  min-width: 0;
}
.rl-comp-editor header > span {
  color: #768276;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rl-comp-editor header h3 {
  font-size: 1.05rem;
  margin: 5px 0 7px;
  font-weight: 600;
}
.rl-comp-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rl-comp-editor-fields > label:last-child {
  grid-column: 1 / -1;
}
.rl-comp-editor-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.rl-comp-editor-footer p {
  margin: 0;
  color: #60736d;
  font-size: 0.73rem;
  line-height: 1.5;
}
.rl-comp-editor-footer button {
  white-space: nowrap;
}
.rl-comp-rate-history {
  border-top: 1px solid #edf0ed;
  padding-top: 12px;
  font-size: 0.78rem;
}
.rl-comp-rate-history summary {
  cursor: pointer;
  color: #52665a;
}
.rl-comp-rate-history summary span {
  color: #879286;
  margin-left: 6px;
}
.rl-comp-rate-history ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.rl-comp-rate-history li {
  display: grid;
  gap: 4px;
}
.rl-comp-rate-history li span {
  color: #60736d;
  font-size: 0.73rem;
}
@keyframes rl-comp-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1000px) {
  .rl-comp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  body.pro-mode .rl-comp-page {
    gap: 16px;
  }
  .rl-comp-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 8px;
  }
  .rl-comp-period-mode {
    grid-column: 1 / -1;
    width: 100%;
  }
  .rl-comp-controls > .rl-comp-filter {
    width: 100%;
  }
  .rl-comp-controls .rl-comp-period-slot {
    width: 100%;
  }
  .rl-comp-kpis {
    gap: 9px;
  }
  .rl-comp-kpi {
    padding: 15px 12px;
    gap: 12px;
    border-radius: 11px;
  }
  .rl-comp-kpi > span {
    font-size: 0.71rem;
  }
  .rl-comp-kpi > strong {
    font-size: 1.3rem;
  }
  .rl-comp-range {
    align-items: start;
  }
  .rl-comp-range > span {
    font-size: 0.7rem;
  }
  .rl-comp-editor {
    padding: 16px 12px;
  }
  .rl-comp-editor-fields {
    gap: 10px;
  }
  .rl-comp-field {
    min-width: 0;
  }
  .rl-comp-field input {
    font-size: 16px;
  }
  .rl-comp-week > summary {
    padding: 12px;
    font-size: 0.75rem;
  }
}
.rl-comp-kpi-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}
.rl-comp-help {
  display: inline-flex;
}
body.pro-mode .rl-comp-kpi .rl-comp-info-trigger {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--color-muted, #60736d);
  cursor: help;
  transition:
    color 160ms ease,
    background 160ms ease;
}
body.pro-mode .rl-comp-help:is(:hover, :focus-within) > .rl-comp-info-trigger {
  color: #236c59;
  background: #eaf5ee !important;
}
.rl-comp-info-trigger:focus-visible {
  outline: 2px solid #27745e;
  outline-offset: 2px;
}
.rl-comp-info-bubble {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(270px, calc(100vw - 64px));
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--color-line, #e2ece8);
  border-radius: 12px;
  background: var(--color-surface, #fff);
  box-shadow: var(--shadow-overlay, 0 8px 26px #172b2a1a);
  color: var(--color-ink-soft, #45594f);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 160ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
}
.rl-comp-info-bubble::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 9px;
}
.rl-comp-kpi:nth-child(2) .rl-comp-info-bubble {
  left: auto;
  right: 0;
}
.rl-comp-info-bubble b {
  color: var(--color-ink, #172b2a);
  font-weight: 600;
}
.rl-comp-help:is(:hover, :focus-within) .rl-comp-info-bubble {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.rl-comp-kpi:has(.rl-comp-help:is(:hover, :focus-within)) {
  position: relative;
  z-index: 5;
}
@media (prefers-reduced-motion: reduce) {
  .rl-comp-page *,
  .rl-comp-page *::before,
  .rl-comp-detail *,
  .rl-comp-editor * {
    transition: none !important;
    animation: none !important;
  }
}

/* The shared title control now accommodates a third tab at every width. */
body.pro-mode
  .dashboard-shell
  .business-team-view-switch:has(#business-team-tab-compensation) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 390px);
}
body.pro-mode
  .dashboard-shell
  .business-team-view-switch:has(#business-team-tab-compensation)
  > button {
  min-width: 0;
  white-space: nowrap;
}
body.pro-mode
  .dashboard-shell
  .business-team-view-switch:has(#business-team-tab-compensation)::before {
  width: calc((100% - 4px) / 3);
}
body.pro-mode
  .dashboard-shell
  .business-team-view-switch:has(
    #business-team-tab-compensation
  )[data-active="roles"]::before {
  transform: translateX(100%);
}
body.pro-mode
  .dashboard-shell
  .business-team-view-switch:has(
    #business-team-tab-compensation
  )[data-active="compensation"]::before {
  transform: translateX(200%);
}

body.pro-mode
  .business-team-drawer-layer[data-team-drawer="compensation"]
  .business-team-drawer-body {
  padding: 20px;
  min-width: 0;
  overflow-x: hidden;
}
.rl-comp-detail {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.rl-comp-detail > section {
  min-width: 0;
  max-width: 100%;
}
.rl-comp-detail .rl-comp-table-scroll {
  width: 100%;
}
@media (max-width: 600px) {
  body.pro-mode
    .business-team-drawer-layer[data-team-drawer="compensation"]
    .business-team-drawer-body {
    padding: 16px;
  }
  .rl-comp-detail-status {
    flex-wrap: wrap;
  }
}

body.pro-mode
  .dashboard-shell
  .dashboard-content
  .rl-comp-controls
  .rl-comp-filter
  .prelook-select-value {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
}

/* Keep all three Team tabs in view on narrow phones when changing sections. */
@media (max-width: 400px) {
  body.pro-mode
    .dashboard-shell
    .dashboard-content
    .business-team-page
    .rl-subtabs
    .business-team-view-switch:has(#business-team-tab-compensation) {
    gap: 14px !important;
  }
  body.pro-mode
    .dashboard-shell
    .dashboard-content
    .business-team-page
    .rl-subtabs
    .business-team-view-switch:has(#business-team-tab-compensation)
    > button {
    font-size: 13px !important;
  }
}
