﻿
.cr-page {
    --cr-blue: #0e9f6e;
    --cr-blue-2: #12b37f;
    --cr-soft: #e7f7f0;
    --cr-line: #dcece4;
    --cr-text: #17342a;
    --cr-muted: #6b8579;
    --cr-new: #fff1cf;
    --cr-new-text: #9b680e;
    --cr-green: #e7f7f0;
    --cr-green-text: #0e7a54;
    --cr-warn-bg: #fff8e3;
    --cr-warn-text: #8a6300;
    --cr-info-bg: #edf6ff;
    --cr-info-text: #426276;
    --cr-danger-bg: #fff0f0;
    --cr-danger-text: #bf4141
}

.cr-page {
    max-width: 1280px;
    margin: auto;
    padding: 0 0 24px;
    font-family: Tahoma,Arial,sans-serif;
    color: var(--cr-text);
    font-size: 15px
}

    .cr-page * {
        box-sizing: border-box
    }

    .cr-page button, .cr-page input {
        font: inherit
    }

    .cr-page button {
        cursor: pointer;
        border: 0;
        background: transparent
    }

    .cr-page input {
        outline: 0
    }

.cr-topbar, .cr-panel, .cr-bottom-area {
    background: #fff;
    border: 1px solid var(--cr-line);
    border-radius: 20px;
    box-shadow: 0 5px 20px #17343a0d
}

.cr-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    margin-bottom: 14px
}

.cr-brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.cr-brand-icon {
    font-size: 28px;
    color: var(--cr-blue)
}

.cr-topbar h1 {
    margin: 0;
    font-size: clamp(18px,3vw,24px)
}

.cr-topbar p {
    margin: 4px 0 0;
    color: var(--cr-muted)
}

.cr-return-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--cr-danger-bg);
    color: var(--cr-danger-text);
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: bold
}

.cr-header-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.cr-icon-only-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: var(--cr-soft);
    color: var(--cr-blue);
    border-radius: 12px;
    font-size: 18px
}

.cr-return-icon {
    background: var(--cr-danger-bg);
    color: var(--cr-danger-text)
}

.cr-customers {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding: 4px 2px 14px
}

.cr-customer {
    flex: 0 0 auto;
    background: #fff;
    color: var(--cr-text);
    border: 1px solid var(--cr-line);
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: bold;
    white-space: nowrap
}

    .cr-customer.active {
        background: var(--cr-blue);
        color: #fff;
        border-color: var(--cr-blue)
    }

.cr-customer-add {
    flex: 0 0 auto;
    background: var(--cr-soft);
    color: var(--cr-blue);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: bold;
    border: 1px dashed var(--cr-blue-2)
}

.cr-workspace {
    display: grid;
    grid-template-columns: 310px minmax(0,1fr);
    gap: 16px
}

.cr-panel {
    padding: 18px
}

.cr-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--cr-line);
    border-radius: 13px;
    padding: 4px 12px;
    margin-bottom: 16px
}

    .cr-search input {
        border: 0;
        outline: 0;
        width: 100%;
        padding: 10px;
        background: transparent
    }

.cr-panel-title {
    font-size: 15px;
    margin: 0 4px 10px
}

.cr-catalog {
    display: grid;
    gap: 8px;
    max-height: 520px;
    overflow: auto;
    padding-left: 2px
}

.cr-catalog-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: right;
    background: #fff;
    border: 1px solid var(--cr-line);
    border-radius: 13px;
    padding: 10px 11px
}

    .cr-catalog-item.selected {
        background: #eaf8f1;
        border-color: var(--cr-blue-2)
    }

    .cr-catalog-item b, .cr-catalog-item small {
        display: block
    }

    .cr-catalog-item small {
        color: var(--cr-muted);
        margin-top: 3px;
        font-weight: normal
    }

    .cr-catalog-item .cr-mid {
        flex: 1;
        min-width: 0;
        overflow: hidden
    }

        .cr-catalog-item .cr-mid b, .cr-catalog-item .cr-mid small {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

.cr-flower {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px
}

.cr-red {
    background: #ffe2e2;
    color: #d83a46
}

.cr-yellow {
    background: #fff5c9;
    color: #d5a900
}

.cr-white {
    background: #f1f4f4;
    color: #9da8a8
}

.cr-pink {
    background: #ffe5ef;
    color: #df6d9b
}

.cr-green-flower {
    background: #e3f2dc;
    color: #579943
}

.cr-orange {
    background: #ffe9d6;
    color: #c9711c
}

.cr-purple {
    background: #f1e4ff;
    color: #8a4fd6
}

.cr-blue-flower {
    background: #dff1fb;
    color: #1f8dc9
}

.cr-check {
    margin-right: auto;
    color: var(--cr-blue);
    font-size: 18px;
    flex: 0 0 auto
}

.cr-empty-catalog {
    color: var(--cr-muted);
    text-align: center;
    padding: 24px 10px
}

.cr-add-product {
    width: 100%;
    margin-top: 10px;
    padding: 13px;
    background: var(--cr-soft);
    color: var(--cr-blue);
    border-radius: 12px;
    font-weight: bold
}

    .cr-add-product:disabled {
        opacity: .55;
        cursor: not-allowed
    }

.cr-main-tabs {
    display: flex;
    gap: 7px
}

.cr-tabs-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--cr-line);
    padding-bottom: 12px;
    margin-bottom: 16px
}

.cr-main-tab {
    padding: 11px 24px;
    border-radius: 11px;
    background: #f0f5f6;
    color: var(--cr-muted);
    font-weight: bold
}

    .cr-main-tab.active {
        background: var(--cr-blue);
        color: #fff
    }

.cr-destination {
    color: var(--cr-muted)
}

    .cr-destination strong {
        color: var(--cr-blue)
    }

.cr-selected {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 16px
}

    .cr-selected .cr-flower {
        width: 58px;
        height: 58px;
        font-size: 30px
    }

    .cr-selected h2 {
        font-size: 20px;
        margin: 0
    }

    .cr-selected span {
        color: var(--cr-muted);
        display: block;
        margin-top: 4px
    }

    .cr-selected small {
        color: var(--cr-muted)
    }

.cr-notice {
    background: var(--cr-info-bg);
    color: var(--cr-info-text);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 18px
}

    .cr-notice.cr-warn {
        background: var(--cr-warn-bg);
        color: var(--cr-warn-text)
    }

.cr-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px
}

    .cr-section-head span {
        color: #000000;
        font-weight: bold
    }

.cr-entry-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 10px;
    align-items: end
}

.cr-field {
    display: grid;
    gap: 6px;
    color: var(--cr-muted);
    font-weight: bold
}

    .cr-field input {
        width: 100%;
        min-height: 50px;
        border: 1px solid var(--cr-line);
        border-radius: 12px;
        padding: 10px 14px;
        outline-color: var(--cr-blue);
        font-size: 18px;
        color: var(--cr-text)
    }

        .cr-field input:disabled {
            background: #f2f2f2;
            color: #999
        }

.cr-alloc-btn {
    min-height: 50px;
    background: var(--cr-blue);
    color: #fff;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap
}

    .cr-alloc-btn:disabled {
        background: #a9c8cb;
        cursor: not-allowed
    }

.cr-cartons {
    display: grid;
    gap: 9px;
    margin-top: 14px
}

.cr-carton-row {
    display: grid;
    /*    grid-template-columns: 34px 1fr 1fr auto 42px;*/
    grid-template-columns: 1px 10fr 10fr auto 1px !important;
    gap: 8px !important;
    align-items: center !important;
    border: 1px solid var(--cr-line) !important;
    border-radius: 20px !important;
    padding: 10px !important;
}

    .cr-carton-row:focus-within {
        border-color: var(--cr-blue);
        box-shadow: 0 0 0 4px #087f8c24
    }

.cr-box-icon {
    color: var(--cr-blue);
    font-size: 20px;
    align-self: center
}

.cr-delete-btn {
    background: var(--cr-danger-bg);
    color: var(--cr-danger-text);
    border-radius: 9px;
    width: 38px;
    height: 38px;
    font-size: 18px;
    align-self: center
}

    .cr-delete-btn:disabled {
        opacity: .5;
        cursor: not-allowed
    }

.cr-total {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--cr-green);
    color: var(--cr-green-text);
    border-radius: 12px;
    padding: 13px 15px;
    margin-top: 14px;
    font-weight: bold
}

.cr-badge {
    display: inline-block;
    border-radius: 9px;
    padding: 6px 12px;
    font-weight: bold;
    font-size: 13px
}

.cr-badge-success {
    background: var(--cr-green);
    color: var(--cr-green-text)
}

.cr-badge-warning {
    background: var(--cr-warn-bg);
    color: var(--cr-warn-text)
}

.cr-badge-info {
    background: var(--cr-info-bg);
    color: var(--cr-info-text)
}

.cr-no-selection {
    color: var(--cr-muted);
    text-align: center;
    padding: 60px 10px
}

.cr-summary-view {
    display: grid;
    gap: 14px
}

.cr-summary-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap
}

    .cr-summary-tools label {
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: bold
    }

    .cr-summary-tools input {
        border: 1px solid var(--cr-line);
        border-radius: 12px;
        padding: 10px 14px;
        outline: 0
    }

.cr-summary-table-wrap {
    border: 1px solid var(--cr-line);
    border-radius: 12px;
    overflow: auto;
    max-height: 500px
}

table.cr-summary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px
}

    table.cr-summary-table th {
        position: sticky;
        top: 0;
        background: var(--cr-soft);
        padding: 13px;
        text-align: center;
        color: var(--cr-text);
        z-index: 1
    }

    table.cr-summary-table td {
        padding: 13px;
        text-align: center;
        border-top: 1px solid var(--cr-line)
    }

.cr-bottom-area {
    display: grid;
    grid-template-columns: 1.4fr repeat(3,1fr) 1.5fr;
    gap: 10px;
    align-items: center;
    padding: 15px;
    margin-top: 16px
}

.cr-summary-title b, .cr-summary-title span {
    display: block
}

.cr-summary-title span {
    color: var(--cr-blue);
    margin-top: 5px
}

.cr-stat {
    text-align: center;
    border-right: 1px solid var(--cr-line)
}

    .cr-stat small {
        display: block;
        color: var(--cr-muted)
    }

    .cr-stat strong {
        font-size: 22px
    }

.cr-actions {
    display: flex;
    gap: 8px
}

.cr-save, .cr-cancel, .cr-draft {
    min-height: 45px;
    border-radius: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 20px
}

.cr-save {
    background: var(--cr-blue);
    color: #fff
}

    .cr-save:disabled {
        background: #a9c8cb;
        cursor: not-allowed
    }

.cr-cancel {
    background: var(--cr-soft);
    color: var(--cr-blue)
}

.cr-draft {
    background: var(--cr-soft);
    color: var(--cr-blue)
}

    .cr-draft:disabled {
        opacity: .55;
        cursor: not-allowed
    }

.cr-bottom-nav {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--cr-line);
    border-radius: 16px;
    margin-top: 12px;
    padding: 13px
}

    .cr-bottom-nav button {
        background: transparent;
        color: var(--cr-muted);
        font-size: 13px
    }

        .cr-bottom-nav button:disabled {
            opacity: .55;
            cursor: not-allowed
        }

    .cr-bottom-nav .current {
        color: var(--cr-blue);
        font-weight: bold
    }

.cr-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid var(--cr-soft);
    border-top-color: var(--cr-blue);
    border-radius: 50%;
    animation: cr-spin 0.8s linear infinite;
    margin: 24px auto
}

@@keyframes cr-spin {
    to {
        transform: rotate(360deg)
    }
}

@@media(max-width:850px) {
    .cr-workspace {
        grid-template-columns: 1fr
    }

    .cr-bottom-area {
        grid-template-columns: repeat(3,1fr)
    }

    .cr-summary-title, .cr-actions {
        grid-column: span 3
    }

    .cr-stat {
        border: 0
    }
}

@@media(max-width:560px) {
    .cr-topbar {
        padding: 14px
    }

    .cr-workspace {
        gap: 10px
    }

    .cr-tabs-line {
        align-items: flex-start;
        flex-direction: column
    }

    .cr-entry-row {
        grid-template-columns: 1fr 1fr
    }

        .cr-entry-row .cr-alloc-btn {
            grid-column: span 2
        }

    .cr-carton-row {
        grid-template-columns: 28px 1fr 1fr 38px
    }

        .cr-carton-row .cr-delete-btn {
            grid-column: 4;
            grid-row: 1 / span 2
        }

    .cr-bottom-area {
        grid-template-columns: repeat(3,1fr)
    }

    .cr-summary-title, .cr-actions {
        grid-column: span 3
    }

    .cr-summary-tools {
        align-items: stretch;
        flex-direction: column
    }
}

