/* Sale Details Right Panel */
.sale-details-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid #e5e7eb;
}

.sale-details-panel.show {
    right: 0;
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-right: 20px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
}

.back-btn:hover {
    color: #374151;
}

.back-btn i {
    width: 16px;
    height: 16px;
}

.sale-id-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sale-id-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.copy-sale-id {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.copy-sale-id:hover {
    background: #e5e7eb;
}

.copy-sale-id i {
    width: 14px;
    height: 14px;
    color: #6b7280;
}

.panel-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.panel-close:hover {
    background: #e5e7eb;
}

.panel-close i {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

/* Panel Body */
.panel-body {
    padding: 20px;
}

/* Sale Status Section */
.sale-status-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.status-badge-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.sale-type-label {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

.void-sale-btn {
    padding: 8px 16px;
    border: 1px solid #fca5a5;
    background: #ffffff;
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.void-sale-btn:hover {
    background: #fef2f2;
}

/* Customer Info Section */
.customer-info-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 24px;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-initial {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.customer-details {
    flex: 1;
}

.customer-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.customer-phone {
    font-size: 14px;
    color: #6b7280;
}

/* Invoice Section */
.invoice-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
}

.invoice-header {
    margin-bottom: 24px;
}

.invoice-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.invoice-date {
    font-size: 14px;
    color: #6b7280;
}

/* Items List */
.items-list {
    margin-bottom: 24px;
}

.sale-item {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.sale-item:last-child {
    border-bottom: none;
}

.item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.item-name {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.item-price {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.item-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

.item-time, .item-duration, .item-staff {
    display: flex;
    align-items: center;
}

/* Staff Information */
.staff-info-section {
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.staff-info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.staff-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.staff-label {
    font-size: 14px;
    color: #6b7280;
}

.staff-email {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
}

.staff-email:hover {
    text-decoration: underline;
}

/* Pricing Breakdown */
.pricing-breakdown {
    margin: 24px 0;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.breakdown-label {
    font-size: 14px;
    color: #6b7280;
}

.breakdown-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

/* Total Section */
.total-section {
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.total-row, .payable-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.total-label, .payable-label {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.total-value, .payable-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* Payment Methods */
.payment-methods-section {
    margin-top: 24px;
}

.payment-methods-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.payment-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

.payment-type {
    font-size: 14px;
    color: #1f2937;
    flex: 1;
}

.payment-amount {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.payment-date {
    font-size: 12px;
    color: #6b7280;
    margin-left: 20px;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sale-details-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .sale-details-panel.show {
        right: 0;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sale-status-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}