
.admin-backorders {
    max-width: 1250px;
    margin: 0 auto;
    padding: 30px 22px 60px;
}

.backorders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.backorders-eyebrow {
    display: block;
    color: #a36b36;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    margin-bottom: 7px;
}

.backorders-header h1 {
    color: #302a26;
    font-size: 1.9rem;
    margin: 0 0 7px;
}

.backorders-header p {
    color: #827a73;
    font-size: 0.9rem;
    margin: 0;
}

.backorder-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 35px;
}

.backorder-stat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 19px;
    background: #fff;
    border: 1px solid #eee8e2;
    border-radius: 11px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.backorder-stat:hover {
    border-color: #c7a17c;
    box-shadow: 0 5px 15px rgba(40, 30, 20, 0.06);
    transform: translateY(-2px);
}

.backorder-stat.active {
    border-color: #700f2d;
    box-shadow: inset 0 0 0 1px #700f2d;
}

.backorder-stat span {
    color: #817970;
    font-size: 0.8rem;
    line-height: 1.4;
}

.backorder-stat strong {
    color: #302a26;
    font-size: 1.7rem;
}

.backorders-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}

.backorders-list-header h2 {
    color: #302a26;
    font-size: 1.15rem;
    margin: 0;
}

.backorders-list-header > span {
    color: #817970;
    font-size: 0.82rem;
}

.backorders-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.backorder-card {
    background: #fff;
    border: 1px solid #eee8e2;
    border-radius: 11px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.backorder-card[open] {
    border-color: #d8c5b4;
}

.backorder-card-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 19px 21px;
    cursor: pointer;
    list-style: none;
}

.backorder-card-summary::-webkit-details-marker {
    display: none;
}

.backorder-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.backorder-main > strong {
    color: #700f2d;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.backorder-main > span {
    color: #302a26;
    font-size: 0.88rem;
    font-weight: 600;
}

.backorder-main small {
    color: #928980;
    font-size: 0.75rem;
}

.backorder-summary-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.backorder-summary-right > strong {
    color: #302a26;
    font-size: 0.9rem;
}

.admin-status {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 30px;
    background: #f2eee9;
    color: #66584b;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-awaiting-stock {
    background: #fff3d8;
    color: #8a5a00;
}

.status-stock-ordered {
    background: #e9f0ff;
    color: #315a9b;
}

.status-stock-received,
.status-ready-for-payment {
    background: #e7f4ec;
    color: #24633d;
}

.status-paid {
    background: #e1f2e8;
    color: #17633a;
}

.status-cancelled {
    background: #fce9e9;
    color: #a12e2e;
}

.expand-indicator {
    color: #9a9086;
    font-size: 0.75rem;
    white-space: nowrap;
}

.backorder-card-details {
    padding: 23px 21px;
    border-top: 1px solid #eee8e2;
    background: #fdfcfa;
}

.backorder-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.backorder-detail-section h3,
.backorder-form-heading h3 {
    color: #302a26;
    font-size: 0.95rem;
    margin: 0 0 15px;
}

.backorder-detail-section p {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #f0ece7;
    font-size: 0.82rem;
}

.backorder-detail-section p span {
    color: #8a8179;
    flex-shrink: 0;
}

.backorder-detail-section p strong {
    color: #302a26;
    text-align: right;
    overflow-wrap: anywhere;
}

.requested-items {
    margin-top: 27px;
}

.requested-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #f0ece7;
}

.requested-item:last-child {
    border-bottom: none;
}

.requested-item > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.requested-item strong {
    color: #302a26;
    font-size: 0.87rem;
}

.requested-item span {
    color: #8a8179;
    font-size: 0.77rem;
}

.requested-quantities {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.requested-quantities strong {
    color: #700f2d;
}

.backorder-extra {
    color: #817970;
    font-size: 0.83rem;
    margin: 12px 0;
}

.backorder-extra strong {
    color: #302a26;
}

.backorder-admin-notes {
    padding: 14px;
    margin-top: 15px;
    border-radius: 8px;
    background: #f4f0eb;
    color: #5d5146;
    font-size: 0.83rem;
}

.backorder-admin-notes p {
    margin: 7px 0 0;
    line-height: 1.6;
}

.backorder-update-form {
    margin-top: 25px;
    padding: 19px;
    background: #fff;
    border: 1px solid #eee8e2;
    border-radius: 9px;
}

.backorder-form-fields {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 13px;
    align-items: end;
}

.backorder-form-fields label {
    display: block;
    color: #5f574f;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 7px;
}

.backorder-form-fields select,
.backorder-form-fields input {
    width: 100%;
    min-height: 43px;
    padding: 10px 11px;
    border: 1px solid #ddd5cd;
    border-radius: 7px;
    background: #fff;
    color: #302a26;
    font: inherit;
    font-size: 0.83rem;
    box-sizing: border-box;
}

.backorder-save-button {
    min-height: 43px;
    padding: 10px 17px;
    border: none;
    border-radius: 7px;
    background: #700f2d;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.backorder-save-button:hover {
    background: #520b21;
}

.backorders-empty {
    padding: 55px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #eee8e2;
    border-radius: 11px;
}

.backorders-empty h3 {
    color: #302a26;
    margin: 0 0 9px;
}

.backorders-empty p {
    color: #817970;
    font-size: 0.88rem;
    margin: 0;
}

@media (max-width: 950px) {
    .backorder-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .backorder-form-fields {
        grid-template-columns: 1fr 1fr;
    }

    .backorder-save-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .admin-backorders {
        padding: 23px 14px 45px;
    }

    .backorder-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .backorder-stat {
        padding: 14px;
    }

    .backorder-stat strong {
        font-size: 1.4rem;
    }

    .backorder-card-summary {
        align-items: flex-start;
        padding: 16px;
    }

    .backorder-summary-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }

    .expand-indicator {
        display: none;
    }

    .backorder-detail-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .backorder-card-details {
        padding: 18px 15px;
    }

    .backorder-form-fields {
        grid-template-columns: 1fr;
    }

    .backorder-save-button {
        grid-column: auto;
        width: 100%;
    }

    .requested-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}
