.dashboard-operating-costs-card {
  margin-top: 1.25rem;
}

.dashboard-operating-costs__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0;
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__header {
  margin-bottom: 0;
}

.dashboard-operating-costs:not(.is-locked) .dashboard-operating-costs__header {
  margin-bottom: 0.35rem;
}

.dashboard-operating-costs__header .dashboard-children__title {
  margin: 0;
}

.dashboard-operating-costs__collapsed-hint {
  display: none;
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #9a9a9a);
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__subtitle,
.dashboard-operating-costs.is-locked .dashboard-operating-costs__body {
  display: none;
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__status:not(.is-error) {
  display: none;
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__status.is-error {
  margin-top: 0.65rem;
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__collapsed-hint {
  display: block;
}

.dashboard-operating-costs:not(.is-locked) .dashboard-operating-costs__collapsed-hint {
  display: none;
}

.dashboard-operating-costs__body {
  margin-top: 0.85rem;
}

.dashboard-operating-costs__status {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted, #9a9a9a);
}

.dashboard-operating-costs__status.is-ok {
  color: #9ad29a;
}

.dashboard-operating-costs__status.is-error {
  color: #ff8f8f;
}

.dashboard-operating-costs__group {
  margin: 0 0 1.25rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.dashboard-operating-costs__group--monthly {
  border-color: rgba(214, 0, 0, 0.28);
}

.dashboard-operating-costs__group--commissions {
  border-color: rgba(120, 180, 255, 0.28);
}

.dashboard-operating-costs__group--daily {
  border-color: rgba(255, 190, 100, 0.28);
}

.dashboard-operating-costs__rule {
  display: grid;
  grid-template-columns: auto minmax(9rem, 1.1fr) minmax(5.5rem, 0.55fr) minmax(6rem, 0.7fr) auto minmax(5.5rem, 0.65fr) minmax(6.5rem, 0.75fr) auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
}

.dashboard-operating-costs__rule-if,
.dashboard-operating-costs__rule-then {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.dashboard-operating-costs__rule select,
.dashboard-operating-costs__rule input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-white, #fff);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.45rem;
}

.dashboard-operating-costs__rule .dashboard-operating-costs__remove {
  min-height: 2.2rem;
}

.dashboard-operating-costs__daily-row {
  display: grid;
  grid-template-columns: minmax(9rem, 0.9fr) minmax(0, 1.4fr) minmax(7rem, 0.7fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.dashboard-operating-costs__daily-row input[type='text'],
.dashboard-operating-costs__daily-row input[type='number'] {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-white, #fff);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.65rem;
  -webkit-appearance: none;
  appearance: none;
}

.dashboard-operating-costs__daily-row input[type='number'] {
  -moz-appearance: textfield;
}

.dashboard-operating-costs__daily-row input[type='number']::-webkit-outer-spin-button,
.dashboard-operating-costs__daily-row input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dashboard-operating-costs__daily-row input:disabled,
.dashboard-operating-costs__row input:disabled,
.dashboard-operating-costs__rule input:disabled,
.dashboard-operating-costs__rule select:disabled,
.dashboard-operating-costs__bypass input:disabled {
  opacity: 1;
  color: var(--text-white, #fff);
  -webkit-text-fill-color: var(--text-white, #fff);
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.14);
}

.dashboard-operating-costs__timestamp {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted, #9a9a9a);
  word-break: break-word;
}

.dashboard-operating-costs__bypass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, 0.55fr);
  gap: 0.55rem;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(120, 180, 255, 0.2);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
}

.dashboard-operating-costs__bypass-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-silver, #c8c8c8);
  line-height: 1.35;
}

.dashboard-operating-costs__bypass input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-white, #fff);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.65rem;
  -moz-appearance: textfield;
}

.dashboard-operating-costs__bypass input::-webkit-outer-spin-button,
.dashboard-operating-costs__bypass input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dashboard-operating-costs__group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.dashboard-operating-costs__title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dashboard-operating-costs__group-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.dashboard-operating-costs__icon-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.dashboard-operating-costs__section-icon {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid rgba(120, 180, 255, 0.35);
  border-radius: 999px;
  background: rgba(120, 180, 255, 0.12);
  color: rgba(170, 210, 255, 0.95);
  cursor: pointer;
  flex-shrink: 0;
}

.dashboard-operating-costs__section-icon:hover {
  border-color: rgba(120, 180, 255, 0.6);
  background: rgba(120, 180, 255, 0.22);
  color: #fff;
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__section-icon,
.dashboard-operating-costs.is-locked .dashboard-operating-costs__icon-bar {
  display: inline-flex !important;
  pointer-events: auto;
  opacity: 1;
}

.dashboard-operating-costs__month-bar {
  display: grid;
  grid-template-columns: auto minmax(10rem, 12rem) minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  align-items: center;
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
}

.dashboard-operating-costs__month-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #9a9a9a);
}

.dashboard-operating-costs__month-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-white, #fff);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.55rem;
  color-scheme: dark;
}

.dashboard-operating-costs__month-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #9a9a9a);
  line-height: 1.35;
}

@media (max-width: 720px) {
  .dashboard-operating-costs__month-bar {
    grid-template-columns: 1fr;
  }
}

.dashboard-operating-costs__hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted, #9a9a9a);
}

.dashboard-operating-costs__rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dashboard-operating-costs__row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(7rem, 0.7fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.dashboard-operating-costs__row--dated {
  grid-template-columns: minmax(0, 1.2fr) minmax(6.5rem, 0.55fr) minmax(9.5rem, 0.9fr) auto;
}

.dashboard-operating-costs__exact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.dashboard-operating-costs__exact-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.dashboard-operating-costs__exact-value {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-silver, #c8c8c8);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-operating-costs__exact--input input[type='date'] {
  color-scheme: dark;
}

.dashboard-operating-costs__row input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-white, #fff);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.65rem;
}

.dashboard-operating-costs__row input[type='number'] {
  -moz-appearance: textfield;
}

.dashboard-operating-costs__row input[type='number']::-webkit-outer-spin-button,
.dashboard-operating-costs__row input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dashboard-operating-costs__remove {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: transparent;
  color: var(--text-silver, #c8c8c8);
  min-height: 2.35rem;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.dashboard-operating-costs__remove:hover {
  border-color: rgba(255, 120, 120, 0.55);
  color: #ff8f8f;
}

.dashboard-operating-costs__empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted, #9a9a9a);
}

.dashboard-operating-costs__actions {
  display: flex;
  justify-content: flex-end;
}

.dashboard-operating-costs.is-locked .dashboard-operating-costs__row input,
.dashboard-operating-costs.is-locked .dashboard-operating-costs__rule input,
.dashboard-operating-costs.is-locked .dashboard-operating-costs__rule select,
.dashboard-operating-costs.is-locked .dashboard-operating-costs__daily-row input,
.dashboard-operating-costs.is-locked .dashboard-operating-costs__bypass input {
  opacity: 0.72;
  cursor: not-allowed;
  pointer-events: none;
}

.dashboard-operating-costs.is-locked [data-opcost-add],
.dashboard-operating-costs.is-locked .dashboard-operating-costs__remove {
  display: none !important;
}

@media (max-width: 1100px) {
  .dashboard-operating-costs__rule {
    grid-template-columns: auto 1fr 1fr;
  }

  .dashboard-operating-costs__rule .dashboard-operating-costs__remove {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .dashboard-operating-costs__row,
  .dashboard-operating-costs__row--dated,
  .dashboard-operating-costs__daily-row,
  .dashboard-operating-costs__rule,
  .dashboard-operating-costs__bypass {
    grid-template-columns: 1fr;
  }

  .dashboard-operating-costs__remove {
    width: 100%;
  }
}

body.commission-sales-lightbox-open {
  overflow: hidden;
}

.commission-sales-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.commission-sales-lightbox[hidden] {
  display: none;
}

.commission-sales-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
}

.commission-sales-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: linear-gradient(180deg, #0e0e0e 0%, #080808 100%);
  box-shadow:
    0 0 0 1px rgba(120, 180, 255, 0.08),
    0 32px 96px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.commission-sales-lightbox__header,
.commission-sales-lightbox__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  background: #0c0c0c;
}

.commission-sales-lightbox__footer {
  border-bottom: 0;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  align-items: center;
  justify-content: flex-end;
}

.commission-sales-lightbox__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #9a9a9a);
}

.commission-sales-lightbox__title {
  margin: 0;
  font-size: 1.1rem;
}

.commission-sales-lightbox__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted, #9a9a9a);
  line-height: 1.45;
}

.commission-sales-lightbox__close {
  border: 0;
  background: transparent;
  color: var(--text-muted, #9a9a9a);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.commission-sales-lightbox__body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
  background: #0a0a0a;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(12, 12, 14, 0.95);
}

.commission-sales-lightbox__section + .commission-sales-lightbox__section {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.commission-sales-lightbox__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.commission-sales-lightbox__section-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.commission-sales-lightbox__section-range {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted, #9a9a9a);
}

.commission-sales-lightbox__section-total {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(170, 210, 255, 0.95);
  white-space: nowrap;
}

.commission-sales-lightbox__section-total span {
  font-weight: 500;
  color: var(--text-muted, #9a9a9a);
}

.commission-sales-lightbox__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.commission-sales-lightbox__sale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.22);
}

.commission-sales-lightbox__sale-buyer {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
}

.commission-sales-lightbox__sale-meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted, #9a9a9a);
}

.commission-sales-lightbox__sale-net {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.commission-sales-lightbox__empty {
  margin: 0;
  padding: 0.45rem 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted, #9a9a9a);
}
