.sales-admin-overview {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.sales-count-card {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.sales-count-card span {
    display: block;
    opacity: 0.72;
    font-size: 0.86rem;
    margin-bottom: 7px;
}

.sales-count-card strong {
    font-size: 1.55rem;
}

.sales-admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.sales-requests-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.sales-request-card {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

.sales-request-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.sales-request-header h3 {
    margin: 0 0 5px;
}

.sales-request-meta {
    opacity: 0.7;
    font-size: 0.85rem;
}

.sales-status-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    white-space: nowrap;
}

.sales-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px 22px;
}

.sales-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sales-field span {
    opacity: 0.65;
    font-size: 0.78rem;
}

.sales-field strong {
    font-size: 0.95rem;
    word-break: break-word;
}

.sales-summary {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    line-height: 1.5;
}

.sales-summary-label {
    display: block;
    opacity: 0.65;
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.sales-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-top: 18px;
}

.sales-actions label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
}

.sales-actions select,
.sales-actions input {
    min-width: 150px;
    padding: 9px 11px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: inherit;
    color: inherit;
}

.sales-save-button {
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 600;
}

.sales-save-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.sales-admin-status {
    min-height: 22px;
    margin: 12px 0;
}

.sales-admin-status.error {
    color: #ff8f8f;
}

.sales-empty {
    padding: 30px 18px;
    text-align: center;
    opacity: 0.7;
}

@media (max-width: 700px) {
    .sales-request-header {
        flex-direction: column;
    }

    .sales-actions {
        align-items: stretch;
    }

    .sales-actions label,
    .sales-actions select,
    .sales-actions input,
    .sales-save-button {
        width: 100%;
    }
}

.sales-summary {
    max-width: 100%;
}

.sales-summary > div {
    overflow-wrap: anywhere;
}


.sales-chat-button {
    padding: 10px 16px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    cursor: pointer;
    font-weight: 600;
}

.sales-chat-button:hover {
    background: rgba(255, 255, 255, 0.09);
}

.sales-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sales-chat-modal.visible {
    display: flex;
}

.sales-chat-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.sales-chat-modal-content {
    position: relative;
    width: min(820px, 100%);
    max-height: min(820px, 88vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #15191f;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.sales-chat-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sales-chat-modal-header h2 {
    margin: 4px 0 0;
}

.sales-chat-modal-content .sales-admin-status {
    padding: 0 22px;
}

.sales-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    overflow-y: auto;
}

.sales-chat-message {
    max-width: 82%;
    padding: 13px 15px;
    border-radius: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sales-chat-message.user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.11);
}

.sales-chat-message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.sales-chat-role {
    display: block;
    margin-bottom: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.65;
}

.sales-chat-empty {
    padding: 28px;
    text-align: center;
    opacity: 0.7;
}

@media (max-width: 700px) {
    .sales-chat-modal {
        padding: 10px;
    }

    .sales-chat-modal-content {
        max-height: 92vh;
    }

    .sales-chat-message {
        max-width: 94%;
    }
}
