.cpd-wrap {
    max-width: none;
}

.cpd-wrap h1 {
    font-weight: 650;
}

.cpd-lead {
    max-width: 760px;
    color: #3c434a;
    font-size: 14px;
}

.cpd-layout {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(230px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.cpd-planter-card,
.cpd-sheet-card,
.cpd-settings-card,
.cpd-toolbar {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.cpd-sheet-card,
.cpd-settings-card,
.cpd-toolbar {
    margin: 16px 0;
}

.cpd-layout .cpd-sheet-card,
.cpd-layout .cpd-planter-card {
    margin: 0;
    min-width: 0;
    overflow: hidden;
}

.cpd-queue-card.is-drop {
    outline: 2px solid #2271b1;
}

.cpd-in-show {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #2271b1;
}
.cpd-planter-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    min-height: 80px;
}

.cpd-planter-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 8px;
    align-items: center;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    background: #fff;
}

.cpd-planter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.cpd-add-show,
.cpd-planter-delete,
.cpd-queue-remove,
.cpd-clear-service {
    box-sizing: border-box;
    font-size: 11px;
    line-height: 1.2;
    padding: 6px 8px;
    min-height: 28px;
    white-space: normal;
}

.cpd-add-show,
.cpd-planter-delete,
.cpd-queue-remove {
    width: 100%;
    text-align: center;
}

.cpd-clear-service {
    width: 100%;
    margin: 10px 0 0;
    background: #007017;
    border-color: #007017;
    color: #fff;
    min-height: 32px;
}

.cpd-clear-service:hover,
.cpd-clear-service:focus {
    background: #005c12;
    border-color: #005c12;
    color: #fff;
}

.cpd-add-show {
    background: #007017;
    border-color: #007017;
    color: #fff;
}

.cpd-add-show:hover,
.cpd-add-show:focus {
    background: #005c12;
    border-color: #005c12;
    color: #fff;
}

.cpd-add-show:disabled {
    background: #8aa892;
    border-color: #8aa892;
    color: #fff;
}

.cpd-add-show,
.cpd-clear-service {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cpd-planter-delete,
.cpd-queue-remove,
.cpd-delete-all {
    background: #fff;
    border-color: #d63638;
    color: #d63638 !important;
    font-weight: 400;
    text-transform: none;
}

.cpd-delete-all {
    width: 100%;
    margin-top: 10px;
}

.cpd-planter-delete:hover,
.cpd-planter-delete:focus,
.cpd-queue-remove:hover,
.cpd-queue-remove:focus {
    background: #fcf0f1;
    border-color: #d63638;
    color: #b32d2e !important;
}

.cpd-planter-list li.is-dragging {
    opacity: 0.65;
    border-color: #d4af37;
    background: #fff8e8;
}

.cpd-order {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cpd-drag,
.cpd-up,
.cpd-down {
    width: 36px;
    height: 32px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.cpd-drag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    background: #f0f0f1;
    font-size: 22px;
}

.cpd-up:disabled,
.cpd-down:disabled {
    opacity: 0.35;
    cursor: default;
}

.cpd-planter-main {
    min-width: 0;
}

.cpd-planter-sums {
    display: block;
    color: #646970;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.cpd-planter-list li.is-selected {
    border-color: #2271b1;
    background: #f0f6fc;
}

.cpd-planter-pick {
    border: 0;
    background: transparent;
    text-align: left;
    font-weight: 650;
    cursor: pointer;
    padding: 0;
    color: #1d2327;
}

.cpd-none-btn,
.cpd-check {
    display: block;
}

.cpd-none-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #2271b1;
    background: #f0f6fc;
    border-radius: 6px;
    padding: 18px 12px;
    min-height: 72px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.cpd-none-btn.is-active {
    border-style: solid;
    border-color: #2271b1;
    background: #f0f6fc;
}

.cpd-sheet th {
    text-align: center;
    letter-spacing: 0.08em;
}

.cpd-sheet td.cpd-num,
.cpd-sheet tfoot td {
    text-align: right;
}

.cpd-check {
    margin: 8px 0;
}

.cpd-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    align-items: flex-end;
}

.cpd-toolbar-block strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
    margin-top: 2px;
}

.cpd-kicker {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #646970;
    font-weight: 650;
}

.cpd-import {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cpd-toolbar-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cpd-status {
    margin: -6px 0 12px;
    color: #646970;
    min-height: 1.2em;
}

.cpd-status.is-error {
    color: #b32d2e;
}

.cpd-status.is-ok {
    color: #007017;
}

.cpd-layout > * {
    align-self: start;
}

.cpd-layout .cpd-sheet-head {
    min-height: 36px;
    margin: 0 0 6px;
}

.cpd-layout .cpd-sheet-head h2 {
    margin: 0;
    line-height: 36px;
}

.cpd-queue-card .cpd-sheet-head {
    margin-bottom: 6px;
}

.cpd-sort-row {
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
}

.cpd-sort-row .button {
    flex: 1;
}
.cpd-sheet-head,
.cpd-settings-card h2,
.cpd-sheet-head h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cpd-sheet-head h2,
.cpd-settings-card h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.cpd-sheet-scroll {
    overflow-x: auto;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.cpd-sheet {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}

.cpd-sheet th,
.cpd-sheet td {
    border: 1px solid #dcdcde;
    padding: 0;
    vertical-align: middle;
}

.cpd-sheet th {
    background: #f6f7f7;
    text-align: left;
    font-size: 12px;
    padding: 8px 10px;
    color: #1d2327;
}

.cpd-sheet tfoot td {
    background: #f8f4e8;
    font-weight: 700;
    padding: 10px;
}

.cpd-col-show { width: 88px; }
.cpd-col-money { width: 200px; }
.cpd-col-actions { width: 72px; }

.cpd-sheet input[type="text"],
.cpd-sheet input[type="number"] {
    width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 10px;
    margin: 0;
    min-height: 40px;
    font-size: 14px;
}

.cpd-sheet input[type="number"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cpd-sheet input:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
    background: #f0f6fc;
}

.cpd-show-cell,
.cpd-actions {
    padding: 8px 10px !important;
    text-align: center;
}

.cpd-show-cell label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.cpd-row.is-selected {
    background: #f3faf3;
}

.cpd-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cpd-actions .button-link {
    margin-right: 8px;
}

.cpd-hint {
    color: #646970;
    margin: 10px 0 0;
}

.cpd-settings-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.cpd-settings-grid label,
.cpd-image-row .cpd-kicker {
    margin-bottom: 6px;
}

.cpd-settings-grid input,
.cpd-settings-grid select {
    width: 100%;
    max-width: 100%;
}

.cpd-image-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 12px;
}

.cpd-image-preview {
    width: 220px;
    height: 124px;
    border: 1px dashed #c3c4c7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f6f7f7;
    color: #646970;
}

.cpd-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpd-none-row td {
    padding: 10px !important;
    background: #f6f7f7;
}

@media (max-width: 782px) {
    .cpd-settings-grid,
    .cpd-image-row,
    .cpd-toolbar,
    .cpd-layout {
        display: block;
    }
    .cpd-toolbar-actions {
        margin: 12px 0 0;
    }
    .cpd-image-preview {
        margin-top: 12px;
    }
}

.cpd-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(7, 17, 31, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cpd-modal form {
    width: min(520px, 100%);
    background: #fff;
    color: #1d2327;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.cpd-modal h3 { margin: 0 0 12px; }
.cpd-modal label { display: block; margin: 10px 0 4px; font-weight: 700; }
.cpd-modal input { width: 100%; box-sizing: border-box; min-height: 40px; }
.cpd-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.cpd-csv-card {
    margin: 16px 0;
}
.cpd-csv-divider {
    width: 1px;
    align-self: stretch;
    background: #c3c4c7;
    margin: 0 8px;
}
