/* Runtime toolbar ownership */
.erp-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #ffffff;
}

.erp-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #1f2f43;
  font-size: 0.9rem;
}

.erp-search kbd {
  border: 0;
  background: transparent;
  color: #7c8b9d;
  font-size: 0.78rem;
}

.erp-select {
  display: inline-flex;
  align-items: center;
  min-width: 126px;
  max-width: 180px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #ffffff;
  color: #162235;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

/* ERP toolbar primitives */
.erp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--erp-line);
  background: var(--erp-surface-soft);
}

.erp-toolbar__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.erp-toolbar__group--actions {
  margin-left: auto;
}

.erp-toolbar__action {
  min-width: 2.1rem;
}
[data-master-editor] .erp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #d5dfe9;
    border-radius: 0.45rem;
    background: #edf2f7;
    margin-bottom: 0.75rem;
}

[data-master-editor] .erp-toolbar__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

[data-master-editor] .erp-toolbar__group--actions {
    margin-left: auto;
}

[data-master-editor] .erp-toolbar .btn {
    min-height: 30px;
    padding: 0.3rem 0.72rem;
    font-size: 0.86rem;
    line-height: 1.1;
    border-radius: 0.4rem;
}

@media (max-width: 767.98px) {
    [data-master-editor] .erp-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    [data-master-editor] .erp-toolbar__group {
        width: 100%;
        justify-content: flex-start;
    }
}
