.section-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

form.search {
    display: flex;
    gap: 6px;
    height: 36px;
}

#project {
    align-items: center;
    display: flex;
    gap: 24px;
    margin-top: 10px;
}

#project .config, #product .config {
    display: flex;
    gap: 8px;
}

.btn-align-right {
    margin-left: auto;
}

h1 {
    margin: 12px 0;
}

h2 {
    margin-top: 24px;
}

#product, #configurations {
    display: grid;
    gap: 10px 30px;
    grid-template-columns: repeat(3, 1fr);
}

.config {
    align-items: center;
    display: flex;
}

.config.config-auto {
    gap: 16px;
}

.config > label {
    flex: 1 1 auto;
    font-weight: 600;
}

.config > .form-switch {
    width: 100%;
}

.config:not(.config-auto) > :is(input, select, .input-group, .form-switch) {
    max-width: 200px;
}

.config.config-lg {
    margin-bottom: 5px;
}

.config.config-lg > :is(input, select, .input-group, .form-switch) {
    max-width: 500px;
}

.table-responsive {
    margin-bottom: 12px;
}

.table-responsive:not(:has(table.table-bordered)) {
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

table {
    counter-reset: row-number;
}

table tbody td.auto-numbering::before {
    content: counter(row-number);
    counter-increment: row-number;
    display: table-cell;
}

table tbody td.numeric {
    text-align: right;
}

table tbody td.row-control {
    text-wrap: nowrap;
}

table tbody td.editable[data-bs-target] {
    cursor: pointer;
}

table tbody td.editable[data-bs-target]::after {
    background: no-repeat url("./pencil-square.svg");
    content: "";
    display: inline-block;
    height: 1rem;
    vertical-align: -0.125em;
    width: 1rem;
}

table tbody td.editable[data-bs-target]:hover {
    color: rgb(var(--bs-link-color-rgb));
    text-decoration: underline;
}

.button-header {
    display: flex;
    justify-content: space-between;
}

#material td[data-unit]::after {
    content: attr(data-unit);
    font-weight: 600;
}

#material input[type=checkbox].disabled {
    pointer-events: none;
}

#new-material td.auto-numbering::before {
    line-height: 31px;
}

#new-material tbody tr:is(:first-of-type, :last-of-type) .field-del,
#new-material tbody tr:not(:first-of-type) .field-reset {
    display: none;
}

#new-material tbody tr:last-of-type:not(:first-of-type) td.auto-numbering::before {
    content: "+";
    font-weight: 600;
}

#new-material tbody tr:last-of-type:not(:first-of-type) {
    position: relative;
}

#new-material tbody tr:last-of-type:not(:first-of-type)::after {
    background-color: var(--bs-border-color);
    content: "";
    display: block;
    height: 100%;
    left: 0;
    opacity: 0.2;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

#new-material input:disabled {
    color: transparent;
}

#new-material td:has(input[type=checkbox]) {
    text-align: center;
    vertical-align: middle;
}

#op-cost :is(thead > tr:first-child, tbody > tr, tfoot > tr) :is(th, td):first-child:not(:last-child) {
    left: 0;
    position: sticky;
}

#op-cost :is(thead > tr:first-child, tbody > tr, tfoot > tr) :is(th, td):last-child:not(:first-child) {
    position: sticky;
    right: 0;
}

#management-cost {
    table-layout: fixed;
    width: 50%;
}

#management-cost tr > :first-child {
    width: 25%;
}

#management-cost caption {
    border: 1px solid;
    border-bottom: none;
    border-color: inherit;
    caption-side: top;
    padding: 0.5rem;
}

.config-group {
    display: grid;
    gap: 10px 50px;
}

.config-group.group-2 {
    grid-template-columns: repeat(2, 1fr);
}

.config-group.group-3 {
    grid-template-columns: repeat(3, 1fr);
}

#management-edit {
    margin-bottom: 24px;
}

fieldset {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.percentage::after {
    content: "%";
}

.currency-usd::before {
    content: "$ ";
}

#quotation {
    table-layout: fixed;
    width: 100%;
}

#quotation tr > :first-child {
    width: 40%;
}

#quotation tr > :not(:first-child) {
    width: 20%;
}

.figure-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.input-group .input-group-text:empty {
    display: none;
}

#process-batch-update tbody th {
    vertical-align: middle;
}

.search-box {
    align-items: center;
    display: flex;
}

#material.searching tbody tr:not(.match),
body:has(#used-only:checked) #material tbody tr:not(.used) {
    display: none;
}

.accordion .accordion-header {
    margin: 0;
}

#blueprints {
    margin-top: 10px;
}

td.has-modal {
    color: rgb(var(--bs-link-color-rgb)) !important;
    cursor: pointer;
    text-decoration: underline;
}

#projects th.table-dark {
    position: sticky;
    top: 0;
}
