:root {
    --brand: #6599bf;
    --brand-dark: #47799d;
    --soft: #edf4f9;
}

header {
    background: #6599bf;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: block;
    width: auto;
    height: 42px;
    object-fit: contain;
}

.brand-lockup strong {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.supplier-add-product > summary {
    border-color: #c3d8e7;
    border-bottom-color: var(--brand);
}

.supplier-column-headings th {
    background: var(--soft);
}

.commercial-price-list {
    padding-top: 72px;
}

.commercial-price-list.supplier-products-panel > .panel-head {
    padding-right: 195px;
}

.pricing-parameters-body {
    margin-top: 18px;
}

.pricing-parameters-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.pricing-parameter-groups {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 16px;
}

.pricing-parameter-group {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.pricing-parameter-group h4 {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
}

.pricing-parameter-group > p {
    margin: 4px 0 12px;
    color: var(--muted);
    font-size: 11px;
}

.pricing-parameter-list {
    display: grid;
    gap: 8px;
}

.pricing-parameter-list .parameter-item {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafb;
}

.pricing-parameter-list .parameter-inline-editor {
    margin-top: 7px;
}

.pricing-parameters-grid .parameter-item {
    padding: 0 14px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
}

.pricing-parameters-grid .parameter-item:first-child {
    padding-left: 0;
}

.pricing-parameters-grid .parameter-item:last-child {
    padding-right: 0;
    border-right: 0;
}

.product-pricing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 276px;
    gap: 18px;
    align-items: start;
}

.product-pricing-layout .commercial-price-list {
    min-width: 0;
    margin: 0;
}

.pricing-settings-rail {
    position: sticky;
    top: 18px;
}

.pricing-settings-drawer {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(18, 56, 61, .06);
}

.pricing-settings-drawer > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.pricing-settings-drawer > summary::-webkit-details-marker {
    display: none;
}

.pricing-settings-drawer > summary::after {
    content: '+';
    color: var(--brand);
    font-size: 18px;
    line-height: 1;
}

.pricing-settings-drawer[open] > summary::after {
    content: '−';
}

.pricing-settings-drawer > summary span {
    display: block;
    font-size: 13px;
}

.pricing-settings-drawer > summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-settings-content {
    padding: 0 14px 14px;
    border-top: 1px solid var(--line);
}

.pricing-settings-content > p {
    margin: 11px 0 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.parameter-item {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.parameter-item:last-child {
    border-bottom: 0;
}

.parameter-readout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.parameter-readout strong,
.parameter-readout small {
    display: block;
}

.parameter-readout strong {
    font-size: 12px;
}

.parameter-readout small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}

.parameter-readout > span {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.parameter-item > .parameter-inline-editor {
    display: block;
    margin-top: 5px;
    text-align: right;
}

.parameter-item .parameter-inline-editor form {
    min-width: 246px;
    text-align: left;
}

.product-pricing-settings {
    padding-top: 24px;
}

.product-pricing-settings .panel-head {
    margin-bottom: 16px;
}

.product-pricing-settings .table-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

.pricing-parameters-table {
    width: 100%;
    min-width: 620px;
    margin: 0;
    table-layout: fixed;
}

.pricing-parameters-table .parameter-name-col { width: 58%; }
.pricing-parameters-table .parameter-value-col { width: 22%; }
.pricing-parameters-table .parameter-action-col { width: 20%; }

.pricing-parameters-table th:not(:first-child),
.pricing-parameters-table td:not(:first-child) {
    text-align: right;
}

.parameter-description {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.parameter-current-value {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.parameter-action-cell {
    overflow: visible;
    white-space: nowrap;
}

.parameter-inline-editor {
    display: inline-block;
}

.parameter-inline-editor form {
    min-width: 270px;
}

.parameter-inline-editor label {
    margin: 0;
}

.percent-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.percent-input input {
    min-width: 0;
}

.inline-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.commercial-price-list .panel-head {
    margin-bottom: 16px;
}

.commercial-price-list .table-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

.commercial-prices {
    width: 100%;
    min-width: 720px;
    margin: 0;
    table-layout: fixed;
}

.commercial-prices .product-col { width: 43%; }
.commercial-prices .price-col { width: 21%; }
.commercial-prices .final-col { width: 20%; }
.commercial-prices .action-col { width: 16%; }

.commercial-category-row th {
    padding: 12px 14px;
    border-top: 14px solid var(--paper);
    background: var(--brand);
    color: #fff;
    font-size: 17px;
    letter-spacing: .025em;
    text-align: left;
    text-transform: uppercase;
}

.commercial-category-row:first-child th {
    border-top-width: 0;
}

.commercial-column-headings th {
    vertical-align: middle;
}

.commercial-column-headings th:nth-child(2) span,
.commercial-column-headings th:nth-child(2) small,
.commercial-column-headings th:nth-child(3) span,
.commercial-column-headings th:nth-child(3) small {
    display: block;
}

.commercial-column-headings th:nth-child(2) small,
.commercial-column-headings th:nth-child(3) small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
}

.commercial-column-headings th:not(:first-child),
.commercial-product-row td:not(:first-child) {
    text-align: right;
}

.money-cell {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.final-price-cell {
    overflow: visible;
}

.final-price-cell > strong {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.automatic-price-cell {
    color: var(--ink);
    font-weight: 400;
}

.final-price-cell.is-adjusted > strong {
    color: var(--brand-dark, var(--brand));
}

.final-price-readout {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.final-price-readout > strong {
    display: block;
    font-size: 14px;
}

.final-price-readout .automatic-price,
.final-price-readout .adjusted-price {
    display: block;
}

.final-price-readout .automatic-price strong {
    display: block;
    font-size: 14px;
}

.final-price-readout.has-adjustment .automatic-price {
    color: var(--muted);
}

.final-price-readout .adjusted-price {
    margin-top: 5px;
}

.final-price-readout .adjusted-price strong {
    display: block;
    color: var(--brand-dark, var(--brand));
    font-size: 15px;
}

.final-price-readout .adjusted-price em {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
    font-style: normal;
    white-space: nowrap;
}

.final-price-readout small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.commercial-inline-editor {
    display: inline-block;
}

.commercial-action-cell {
    overflow: visible;
    white-space: nowrap;
}

.commercial-inline-editor form {
    min-width: 260px;
}

.commercial-inline-editor label {
    margin: 0;
}

.dvh-prices {
    min-width: 1260px;
}

.dvh-prices .dvh-product-col { width: 20%; }
.dvh-prices .dvh-stage-col { width: 13.5%; }
.dvh-prices .dvh-final-col { width: 13%; }
.dvh-prices .dvh-action-col { width: 13%; }

.dvh-column-headings th:not(:first-child),
.dvh-product-row td:not(:first-child) {
    text-align: right;
}

.dvh-column-headings th {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 10px;
    letter-spacing: .015em;
    white-space: nowrap;
}

.dvh-column-headings th span,
.dvh-column-headings th small {
    display: block;
}

.dvh-column-headings th small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.dvh-product-row .money-cell {
    font-size: 12px;
}

.dvh-product-row .final-price-cell > strong,
.dvh-product-row .final-price-cell > small {
    display: block;
}

.dvh-product-row .final-price-cell > strong {
    color: var(--brand-dark, var(--brand));
    font-size: 16px;
}

.dvh-product-row .final-price-cell > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.camera-prices-panel .table-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

.camera-prices-table {
    width: 100%;
    min-width: 660px;
    margin: 0;
    table-layout: fixed;
}

.camera-prices-table .camera-name-col { width: 38%; }
.camera-prices-table .camera-price-col { width: 18%; }
.camera-prices-table .camera-status-col { width: 14%; }
.camera-prices-table .camera-actions-col { width: 30%; }

.camera-column-headings th:nth-child(2),
.camera-prices-table td:nth-child(2) {
    text-align: right;
}

.camera-column-headings th:nth-child(2) span,
.camera-column-headings th:nth-child(2) small {
    display: block;
}

.camera-column-headings th:nth-child(2) small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
}

.camera-price-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.camera-price-cell > strong,
.camera-price-cell > small {
    display: block;
}

.camera-price-cell > strong {
    font-size: 14px;
}

.camera-price-cell > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
}

.camera-item-actions {
    white-space: nowrap;
}

.camera-inline-editor form {
    min-width: 270px;
}

.camera-inline-editor label {
    margin: 0;
}

.camera-add-form {
    grid-template-columns: 120px 210px auto;
    justify-content: start;
}

.camera-add-form label:first-of-type input {
    width: 7ch;
}

.camera-add-form label:nth-of-type(2) input {
    width: 12ch;
}

@media (max-width: 1100px) {
    .product-pricing-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pricing-settings-rail {
        position: static;
    }
}

@media (max-width: 760px) {
    .commercial-price-list {
        margin-right: -14px;
        margin-left: -14px;
        border-radius: 0;
    }

    .commercial-price-list .panel-head {
        padding-right: 14px;
        padding-left: 14px;
    }

    .commercial-price-list .table-wrap {
        padding-bottom: 8px;
    }

    .pricing-settings-rail {
        margin: 0 -2px;
    }
}

@media (max-width: 700px) {
    .brand-logo {
        height: 34px;
    }

    .brand-lockup {
        gap: 8px;
    }

    .brand-lockup strong {
        font-size: 12px;
    }

    .commercial-price-list.supplier-products-panel > .panel-head {
        padding-right: 0;
    }

    .commercial-price-list {
        padding-top: 24px;
    }

    .pricing-parameter-groups {
        grid-template-columns: 1fr;
    }

    .pricing-parameters-grid {
        grid-template-columns: 1fr;
    }

    .pricing-parameters-grid .parameter-item,
    .pricing-parameters-grid .parameter-item:first-child,
    .pricing-parameters-grid .parameter-item:last-child {
        padding: 10px 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .pricing-parameters-grid .parameter-item:last-child {
        border-bottom: 0;
    }

    .camera-add-form {
        grid-template-columns: 1fr;
    }

    .camera-add-form label:first-of-type input,
    .camera-add-form label:nth-of-type(2) input {
        width: min(100%, 16ch);
    }
}
