.commission-page {
  max-width: 1680px;
}

.commission-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.commission-kpi,
.commission-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.commission-kpi {
  padding: 18px;
}

.commission-kpi span {
  display: block;
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.commission-kpi strong {
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1.2;
}

.commission-form .form-label {
  color: #475569;
  font-weight: 600;
}

.commission-search {
  max-width: 280px;
}

.commission-table-wrap {
  min-height: 420px;
  overflow-x: auto;
}

.commission-scope {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
  white-space: nowrap;
}

.commission-rate {
  font-weight: 800;
  color: #be185d;
}

.simulation-result {
  border: 1px dashed rgba(15, 23, 42, 0.2);
  border-radius: 8px;
  padding: 14px;
  color: #475569;
  background: #f8fafc;
}

#simBaseAmount:read-only {
  background: #f1f5f9;
  cursor: default;
}

#simVariantSelect:disabled {
  background: #f8fafc;
}

.commission-notify-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(214, 51, 132, 0.18);
  border-radius: 8px;
  background: #fff7fb;
  padding: 12px;
  cursor: pointer;
}

.commission-notify-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #d63384;
}

.commission-notify-toggle strong,
.commission-notify-toggle small {
  display: block;
}

.commission-notify-toggle small {
  color: #64748b;
  margin-top: 2px;
}

.entity-picker,
.mini-picker {
  position: relative;
}

.entity-picker-button,
.mini-picker-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
}

.mini-picker-button {
  min-height: 42px;
  font-size: 0.94rem;
}

.entity-picker-button:hover,
.mini-picker-button:hover {
  border-color: #d63384;
}

.entity-picker-panel,
.mini-picker-panel {
  position: absolute;
  z-index: 1040;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  padding: 10px;
}

.entity-picker-results,
.mini-picker-results {
  max-height: 340px;
  overflow: auto;
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.mini-picker-results {
  max-height: 260px;
}

.entity-option,
.mini-option {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  text-align: left;
}

.mini-option {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 8px;
}

.entity-option:hover,
.mini-option:hover {
  border-color: rgba(214, 51, 132, 0.35);
  background: #fff7fb;
}

.entity-thumb,
.mini-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
}

.mini-thumb {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
}

.entity-thumb img,
.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-option strong,
.mini-option strong,
.entity-selected-card strong {
  display: block;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-option small,
.mini-option small,
.entity-selected-card small {
  display: block;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-selected-card {
  margin-top: 10px;
  border: 1px solid rgba(214, 51, 132, 0.22);
  border-radius: 8px;
  background: #fff7fb;
  padding: 12px;
}

.selected-shop-layout {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.selected-shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.entity-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  margin: 6px 6px 0 0;
}

.entity-empty {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  padding: 14px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 768px) {
  .commission-page {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .commission-search {
    max-width: 100%;
  }

  .entity-picker-panel,
  .mini-picker-panel {
    position: static;
    margin-top: 8px;
  }
}
