/* ════════════════════════════════════════════════════════
   pos-custom.css — LEGACY  |  POS layout overridden by pos-v2.css
   Keep for: modals, payment, expiry badges, flash banners
   ════════════════════════════════════════════════════════ */

/* ===================================
   POS Design - مطابق للصورة المرفقة
   =================================== */

:root {
    --primary-green: #28a745;
    --primary-blue: #007bff;
    --primary-purple: #6f42c1;
    --primary-red: #dc3545;
    --primary-orange: #fd7e14;
    --dark: #212529;
    --light: #f8f9fa;
    --border: #dee2e6;
}

/* الحاوية الرئيسية - قابلة للتمرير */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 0;
    min-height: calc(100vh - 100px);
    height: auto;
    padding: 0;
    background: #f5f5f5;
    margin: 0;
}

/* الجانب الأيسر - شبكة المنتجات */
.pos-left {
    background: white;
    padding: 15px;
    overflow-y: auto;
    border-right: 2px solid #e0e0e0;
}

/* شريط البحث */
.pos-search {
    margin-bottom: 15px;
}

.search-box {
    position: relative;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    height: 45px;
    padding: 0 15px 0 45px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
}

.search-box > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #6c757d;
}

.scan-btn {
    width: 45px;
    height: 45px;
    background: var(--primary-green);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* شبكة المنتجات - 5 أعمدة */
.pos-products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 5px;
}

/* بطاقة المنتج */
.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-green);
}

.product-card:nth-child(5n+1)::before { background: var(--primary-orange); }
.product-card:nth-child(5n+2)::before { background: var(--primary-blue); }
.product-card:nth-child(5n+3)::before { background: var(--primary-purple); }
.product-card:nth-child(5n+4)::before { background: var(--primary-red); }
.product-card:nth-child(5n+5)::before { background: var(--primary-green); }

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card .product-image {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #f8f9fa;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card .product-image i {
    font-size: 48px;
    color: #6c757d;
}

.product-card .product-name {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-price {
    font-size: 15px;
    font-weight: 700;
    color: #28a745;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    width: 100%;
}

.product-card .product-stock {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
}

.product-card .product-stock.low {
    color: #dc3545;
    font-weight: 600;
}

/* الجانب الأيمن - السلة - بدون قيود ارتفاع */
.pos-right {
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    min-height: 100%;
}

/* رأس السلة - أخضر */
.cart-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.cart-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
}

.cart-total-display {
    font-size: 16px;
    margin-bottom: 5px;
}

.cart-total-amount {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

/* قائمة المنتجات في السلة - بدون تمرير */
.cart-items {
    padding: 15px;
    background: #f8f9fa;
}

/* إزالة scrollbar styles لأننا لن نحتاجها */

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* عنصر في السلة - كبير وواضح */
.cart-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 12px;
    border-right: 5px solid #28a745;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.cart-item-name {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    flex: 1;
    line-height: 1.4;
}

.cart-item-quantity {
    font-size: 18px;
    color: #495057;
    background: #e9ecef;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
}

.cart-item-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.cart-item-price {
    font-size: 17px;
    color: #495057;
    font-weight: 600;
}

.cart-item-total {
    font-size: 24px;
    font-weight: 800;
    color: #28a745;
}

.cart-item-remove {
    background: #fff;
    border: 2px solid #dc3545;
    color: #dc3545;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    margin-right: 12px;
    font-weight: 700;
}
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    margin-right: 10px;
}

.cart-item-remove:hover {
    background: #dc3545;
    color: white;
}

/* ملخص السلة - أكبر وأوضح */
.cart-summary {
    background: white;
    padding: 18px;
    border-top: 2px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 18px;
}

.summary-row span:first-child {
    color: #495057;
    font-weight: 600;
}

.summary-row span:last-child {
    font-weight: 700;
    color: #212529;
    font-size: 19px;
}

.summary-row.total {
    border-top: 3px solid #28a745;
    margin-top: 12px;
    padding-top: 16px;
    font-size: 22px;
}

.summary-row.total span:first-child {
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: #28a745;
    font-size: 28px;
    font-weight: 800;
}

/* أزرار الإجراءات */
.cart-actions {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.cart-actions .btn {
    width: 100%;
    height: 55px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 1400px) {
    .pos-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 1fr;
    }
    
    .pos-right {
        width: 520px;
        margin: 0 auto;
    }
    
    .pos-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .pos-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* تحسينات إضافية */
.product-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* معاينة الفاتورة */
.invoice-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

/* نافذة الدفع المخصصة */
.payment-modal-custom {
    width: 100%;
    max-width: 600px;
}

.payment-amount-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.payment-amount-header .amount-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.payment-amount-header .amount-value {
    color: white;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.payment-method-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.payment-method-title i {
    color: #28a745;
    font-size: 24px;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.payment-method-card {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.payment-method-card:hover {
    border-color: #28a745;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.2);
}

.payment-method-card.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.payment-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 12px;
}

.payment-method-card.selected .payment-icon {
    color: #155724;
}

.payment-name {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

/* تفاصيل الدفع كاش */
.cash-payment-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.payment-form-group {
    margin-bottom: 20px;
}

.payment-form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.payment-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #ced4da;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}

.payment-input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.change-display-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid #28a745;
}

.change-label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 8px;
}

.change-amount {
    font-size: 32px;
    font-weight: 800;
    color: #28a745;
}

/* تفاصيل الدفع الأخرى */
.other-payment-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.payment-confirm-msg {
    background: #d1ecf1;
    border: 2px solid #bee5eb;
    color: #0c5460;
    padding: 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.payment-confirm-msg i {
    font-size: 22px;
}

/* زر إتمام الدفع */
.btn-complete-payment {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-complete-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-complete-payment i {
    font-size: 22px;
}

/* ══════════════════════════════════════════════════════
   فاتورة العميل — تصميم احترافي جديد
   ══════════════════════════════════════════════════════ */

/* خلفية المودال */
/* خط Cairo العربي على الفاتورة */
.customer-invoice-modal-thermal,
.thermal-invoice-container,
.thermal-receipt-wrapper,
.thermal-receipt-wrapper * {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Arial, sans-serif !important;
}

.customer-invoice-modal-thermal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* الحاوية الخارجية */
.thermal-invoice-container {
    background: #1a1a2e;
    border-radius: 20px;
    max-width: 430px;
    width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
    animation: invoiceSlideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

@keyframes invoiceSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* زر الإغلاق */
.thermal-close-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    z-index: 20;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thermal-close-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: rotate(90deg);
}

/* ── ورقة الفاتورة البيضاء ── */
.thermal-receipt {
    background: #fff;
    margin: 16px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
    font-size: 13px;
    line-height: 1.5;
}

/* رأس المتجر — شريط ملوّن */
.thermal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    color: #fff;
    text-align: center;
    padding: 22px 20px 18px;
    position: relative;
    overflow: hidden;
}
.thermal-header::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: rgba(201,168,76,0.12);
    border-radius: 50%;
}
.thermal-header::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -20px;
    width: 70px; height: 70px;
    background: rgba(201,168,76,0.08);
    border-radius: 50%;
}

.thermal-logo {
    margin-bottom: 10px;
}
.thermal-logo img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.15);
}

.store-name-thermal {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.store-detail {
    font-size: 11.5px;
    color: rgba(255,255,255,0.65);
    margin: 2px 0;
    position: relative;
    z-index: 1;
}

/* شريط عنوان الفاتورة */
.thermal-tax-header {
    background: linear-gradient(90deg, #C9A84C, #A8842A);
    text-align: center;
    padding: 8px 16px;
}
.tax-invoice-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
}
.tax-invoice-title-ar {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-top: 1px;
}
.trn {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    margin-top: 3px;
    letter-spacing: 0.5px;
}

/* فاصل منقط */
.thermal-separator {
    border: none;
    border-top: 1.5px dashed #dde1e7;
    margin: 0 16px;
}

/* معلومات الفاتورة */
.thermal-info {
    padding: 12px 16px;
    background: #f8fafc;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: #64748b; font-weight: 600; }
.info-row span:last-child  { color: #1e293b; font-weight: 700; }

/* قسم المنتجات */
.thermal-products {
    padding: 12px 16px;
}

.thermal-product-item {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.thermal-product-item:last-child { border-bottom: none; }

.product-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.product-number {
    width: 22px;
    height: 22px;
    background: #1e293b;
    color: #fff;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.product-names { flex: 1; }
.product-name-en {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}
.product-name-ar {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.4;
    direction: rtl;
}

.product-line {
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 6px;
    gap: 8px;
}
.product-qty-price {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.product-qty-price .label {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product-qty-price .value {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.product-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 8px;
    padding: 6px 10px;
}
.product-total-line .total-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
}
.product-total-line .total-value {
    font-size: 14px;
    font-weight: 800;
    color: #C9A84C;
}

.item-separator { display: none; }

/* المجاميع */
.thermal-totals {
    padding: 10px 16px;
    background: #f8fafc;
}
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 12.5px;
    border-bottom: 1px solid #e9edf2;
}
.total-row:last-child { border-bottom: none; }
.total-row span:first-child { color: #64748b; font-weight: 600; }
.total-row span:last-child  { color: #1e293b; font-weight: 700; }

/* الإجمالي الكبير */
.thermal-grand-total {
    padding: 0 16px 4px;
}
.grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #C9A84C 0%, #A8842A 100%);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 8px 0;
    box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
.grand-total-row span:first-child {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.grand-total-row span:last-child {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
}

/* الدفع */
.thermal-payment {
    padding: 8px 16px 12px;
}
.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 12.5px;
}
.payment-row span:first-child { color: #64748b; font-weight: 600; }
.payment-row span:last-child  { color: #1e293b; font-weight: 700; }

/* الذيل */
.thermal-footer {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    text-align: center;
    padding: 18px 16px;
    border-radius: 0 0 14px 14px;
}
.thank-you-en {
    font-size: 15px;
    font-weight: 800;
    color: #C9A84C;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.thank-you-ar {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin: 4px 0;
    direction: rtl;
}
.powered-by {
    font-size: 9.5px;
    color: rgba(255,255,255,0.3);
    margin-top: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.footer-date {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    margin-top: 3px;
}

/* ── أزرار الإجراءات ── */
.thermal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px 16px;
}

.btn-thermal-print-direct,
.btn-thermal-preview,
.btn-cash-drawer,
.btn-thermal-close {
    padding: 13px 10px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
}

.btn-thermal-print-direct {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
    grid-column: 1 / -1;
}
.btn-thermal-print-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.45);
}
.btn-thermal-print-direct i { font-size: 16px; }

.btn-thermal-preview {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-thermal-preview:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-cash-drawer {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
    grid-column: 1 / -1;
}
.btn-cash-drawer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.45);
}

.btn-thermal-close {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-thermal-close:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}


/* ══ أزرار الإجراءات ══ */
.thermal-receipt-wrapper {
    padding: 14px 14px 6px;
}

.thermal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 14px 18px;
}

.tact-btn {
    padding: 11px 6px;
    border: none;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
    line-height: 1.2;
}
.tact-btn i { font-size: 17px; }
.tact-btn span { font-size: 11px; }

.tact-btn:hover { transform: translateY(-2px); }
.tact-btn:active { transform: translateY(0); }

.tact-print {
    background: linear-gradient(135deg, #0c1b33, #1e3a5f);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15,23,42,0.35);
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 8px;
    padding: 14px;
    font-size: 14px;
    border: 1px solid rgba(201,168,76,0.25);
}
.tact-print:hover {
    background: linear-gradient(135deg, #1e3a5f, #2d5986) !important;
}
.tact-print span { font-size: 14px; }
.tact-print i { font-size: 18px; }
.tact-print:hover { box-shadow: 0 6px 18px rgba(37,99,235,0.45); }

.tact-pdf {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.tact-pdf:hover { box-shadow: 0 6px 16px rgba(220,38,38,0.4); }

.tact-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.tact-whatsapp:hover { box-shadow: 0 6px 16px rgba(37,211,102,0.4); }

.tact-drawer {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}
.tact-drawer:hover { box-shadow: 0 6px 16px rgba(5,150,105,0.4); }

.tact-preview {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.1);
}
.tact-preview:hover { background: rgba(255,255,255,0.1); color: #fff; }

.tact-close {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.1);
}
.tact-close:hover { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }

.btn-thermal-print-direct,
.btn-thermal-preview,
.btn-cash-drawer,
.btn-thermal-close,
.btn-whatsapp-invoice { display: none; }


@media (max-width: 480px) {
    .thermal-receipt { margin: 10px; }
    .thermal-invoice-container { border-radius: 16px; }
    .grand-total-row span:last-child { font-size: 17px; }
    .thermal-actions { grid-template-columns: 1fr; }
    .btn-thermal-print-direct { grid-column: auto; }
    .btn-cash-drawer { grid-column: auto; }
}

@media print {
    .thermal-close-btn, .thermal-actions { display: none !important; }
    .thermal-invoice-container { box-shadow: none; margin: 0; border-radius: 0; background: #fff; }
    .thermal-receipt { margin: 0; border-radius: 0; box-shadow: none; }
}


.btn-whatsapp-invoice {
    padding: 13px 10px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,211,102,0.35);
}
.btn-whatsapp-invoice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,0.45);
}
.btn-whatsapp-invoice i { font-size: 16px; }


/* ════════════════════════════════════════════════════════════════
   نموذج المنتج المحترف — Product Form Modal
   ════════════════════════════════════════════════════════════════ */

.pf-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: 'Cairo', Arial, sans-serif;
    direction: rtl;
}

/* ── الجزء العلوي: الصورة + الكود + الاسم ── */
.pf-top {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e8eef4;
}

/* منطقة الصورة */
.pf-img-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    position: relative;
}

.pf-img-preview {
    width: 110px;
    height: 110px;
    border-radius: 14px;
    border: 2.5px dashed #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
    position: relative;
}
.pf-img-preview:hover { border-color: #C9A84C; }

.pf-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}
.pf-img-placeholder i    { font-size: 28px; }
.pf-img-placeholder small{ font-size: 10px; text-align: center; }

.pf-img-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.pf-img-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    font-family: 'Cairo', Arial, sans-serif;
    transition: all 0.15s;
    white-space: nowrap;
}
.pf-img-btn.upload { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.pf-img-btn.upload:hover { background: #2563eb; color: #fff; }
.pf-img-btn.emoji  { background: #fef9c3; color: #ca8a04; border-color: #fde68a; }
.pf-img-btn.emoji:hover  { background: #ca8a04; color: #fff; }
.pf-img-btn.remove { background: #fff1f2; color: #dc2626; border-color: #fecaca; }
.pf-img-btn.remove:hover { background: #dc2626; color: #fff; }

/* كود المنتج */
.pf-top-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.pf-code-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pf-code-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pf-code-box {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    border-radius: 8px;
    padding: 6px 10px;
    gap: 6px;
}
.pf-code-box input { color: #C9A84C !important; }

/* ── أقسام الفورم ── */
.pf-section {
    padding: 16px 20px;
    border-bottom: 2px solid #f1f5f9;
}
.pf-section:last-child { border-bottom: none; }

.pf-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.pf-section-title i { color: #C9A84C; }

/* ── شبكة وحدة البيع ── */
.pf-unit-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.pf-unit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff;
    text-align: center;
}
.pf-unit-card:hover {
    border-color: var(--uc, #C9A84C);
    background: #fafafa;
    transform: translateY(-2px);
}
.pf-unit-card.selected {
    border-color: var(--uc, #C9A84C);
    background: color-mix(in srgb, var(--uc, #C9A84C) 8%, white);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.pf-unit-card i { font-size: 18px; }
.pf-unit-ar { font-size: 11px; font-weight: 800; color: #0f172a; }
.pf-unit-en { font-size: 9px; color: #94a3b8; font-weight: 600; }

/* ── شبكة الأسعار ── */
.pf-price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.pf-price-grid .pf-piece-row {
    grid-column: 1;
}

/* input with prefix */
.pf-input-prefix {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.pf-input-prefix:focus-within { border-color: #C9A84C; box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
.pf-prefix {
    background: #f8fafc;
    border-left: 1.5px solid #e2e8f0;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
    white-space: nowrap;
}
.pf-input-prefix input {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    min-width: 0;
}

/* باركود */
.pf-barcode-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.pf-barcode-row input { flex: 1; }

/* form-group داخل pf-section */
.pf-section .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}
.pf-section .form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.pf-section .form-group input,
.pf-section .form-group select {
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-family: 'Cairo', Arial, sans-serif;
    transition: border-color 0.2s;
    outline: none;
    background: #fff;
}
.pf-section .form-group input:focus,
.pf-section .form-group select:focus {
    border-color: #C9A84C;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

/* responsive */
@media (max-width: 560px) {
    .pf-top { grid-template-columns: 1fr; }
    .pf-img-zone { flex-direction: row; align-items: flex-start; }
    .pf-unit-grid { grid-template-columns: repeat(5, 1fr); }
    .pf-price-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   رأس المال + خسائر المخزون — CSS
   ════════════════════════════════════════════════════════════════ */

/* بطاقات رأس المال */
.capital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.cap-loading {
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #94a3b8;
}
.cap-card {
    background: var(--cb, #fffbeb);
    border: 2px solid color-mix(in srgb, var(--cc,#C9A84C) 20%, white);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: transform 0.2s;
}
.cap-card:hover { transform: translateY(-3px); }
.cap-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--cc, #C9A84C);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 20px;
}
.cap-card-body { flex: 1; }
.cap-card-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 5px; }
.cap-card-val   { font-size: 20px; font-weight: 900; color: var(--cc, #C9A84C); direction: ltr; }
.cap-card-sub   { font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* صفوف الربح */
.profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
}
.profit-row:last-child { border-bottom: none; }
.profit-row.big .pr-label { font-weight: 900; font-size: 14px; color: #0f172a; }
.pr-label { font-size: 13px; font-weight: 600; color: #475569; }
.pr-val   { font-size: 14px; font-weight: 800; color: #0f172a; direction: ltr; }
.profit-divider { border-top: 2px dashed #e2e8f0; margin: 8px 0; }

/* بطاقات إحصاء الخسائر */
.loss-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 4px;
}
.loss-stat-card {
    background: var(--lb, #fff1f2);
    border: 2px solid color-mix(in srgb, var(--lc,#ef4444) 18%, white);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.lsc-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--lc, #ef4444);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; flex-shrink: 0;
}
.lsc-label { font-size: 11px; font-weight: 700; color: #64748b; }
.lsc-val   { font-size: 20px; font-weight: 900; color: var(--lc, #ef4444); }
.lsc-cost  { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* شريط أدوات الجدول */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 2px solid #e8eef4;
    gap: 10px;
    flex-wrap: wrap;
}
.table-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-toolbar-left  { display: flex; gap: 8px; align-items: center; }

/* ════════════════════════════════════════════════════════════════
   بطاقات الشحن — Recharge Cards CSS
   ════════════════════════════════════════════════════════════════ */

.rc-operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.rc-loading {
    grid-column: 1/-1;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px; padding: 40px; color: #94a3b8;
}

.rc-op-card {
    background: var(--opb, #f8fafc);
    border: 2px solid color-mix(in srgb, var(--opc,#64748b) 20%, white);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.rc-op-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
    background: var(--opc, #64748b);
    border-radius: 0 14px 14px 0;
}
.rc-op-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--opc,#64748b) 25%, transparent);
    border-color: var(--opc, #64748b);
}

.rc-op-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px;
}
.rc-op-logo { font-size: 26px; }
.rc-op-name { font-size: 14px; font-weight: 900; color: var(--opc, #0f172a); }

.rc-op-stat-main { margin-bottom: 10px; }
.rc-op-big  { font-size: 32px; font-weight: 900; color: #0f172a; line-height: 1; }
.rc-op-sub  { font-size: 11px; color: #94a3b8; font-weight: 600; margin-top: 2px; }
.rc-op-val  { font-size: 14px; font-weight: 800; color: var(--opc,#64748b); margin-top: 4px; }

.rc-op-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.rc-pill {
    padding: 2px 8px; border-radius: 20px;
    font-size: 10px; font-weight: 700;
}
.rc-pill.sold { background: #dbeafe; color: #1d4ed8; }
.rc-pill.ret  { background: #ede9fe; color: #6d28d9; }
.rc-pill.dmg  { background: #fee2e2; color: #dc2626; }

.rc-table-section {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e8eef4;
    overflow: hidden;
}
.rc-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 2px solid #e8eef4;
    flex-wrap: wrap;
    gap: 10px;
}

/* ════════════════════════════════════════════════════════════════
   بطاقات الشحن v2 — تبويبات + لوحة الشبكة + شبكة الفئات
   ════════════════════════════════════════════════════════════════ */

/* تبويبات الشبكات */
.rc-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 14px;
    border: 2px solid #e8eef4;
}
.rc-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    color: #475569;
    transition: all 0.18s;
}
.rc-tab:hover {
    border-color: var(--tc, #64748b);
    color: var(--tc, #64748b);
}
.rc-tab.active {
    background: var(--tc, #64748b);
    border-color: var(--tc, #64748b);
    color: #fff;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--tc,#64748b) 40%, transparent);
}
.rc-tab-logo { font-size: 18px; }
.rc-tab-name { font-size: 13px; }
.rc-tab-count {
    background: #94a3b8;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
    transition: background 0.3s;
}
.rc-tab.active .rc-tab-count { background: rgba(255,255,255,0.3); }

/* لوحة الشبكة */
.rcp-wrap {
    background: #fff;
    border-radius: 18px;
    border: 2px solid #e8eef4;
    overflow: hidden;
}

.rcp-header {
    background: var(--opg, linear-gradient(135deg,#0f172a,#1a3a6b));
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.rcp-header-left { display: flex; align-items: center; gap: 14px; }
.rcp-logo { font-size: 44px; }
.rcp-opname { font-size: 22px; font-weight: 900; color: #fff; }
.rcp-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
}
.rcp-stats-row span { display: flex; align-items: center; gap: 5px; }
.rcp-stats-row .rcp-sold { color: #86efac; }
.rcp-stats-row .rcp-ret  { color: #c4b5fd; }
.rcp-stats-row .rcp-dmg  { color: #fca5a5; }

/* صندوق رصيد المكينة */
.rcp-machine-box {
    background: rgba(0,0,0,0.25);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 14px 18px;
    min-width: 180px;
    text-align: center;
    backdrop-filter: blur(8px);
}
.rcp-machine-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.rcp-machine-val   { font-size: 28px; font-weight: 900; color: #C9A84C; line-height: 1; }
.rcp-machine-unit  { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 700; margin-bottom: 10px; }
.rcp-machine-btns  { display: flex; gap: 6px; justify-content: center; }
.rcp-machine-btn {
    padding: 5px 10px;
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 7px;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.08);
    transition: all 0.15s;
}
.rcp-machine-btn:hover  { background: rgba(255,255,255,0.18); color: #fff; }
.rcp-machine-btn.primary { background: #C9A84C; color: #0f172a; border-color: #C9A84C; }
.rcp-machine-btn.primary:hover { background: #E8C05A; }

/* عنوان شبكة الفئات */
.rcp-dens-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e8eef4;
    font-size: 13px;
    font-weight: 800;
    color: #475569;
}
.rcp-dens-title i { color: #C9A84C; }
.rcp-add-btn {
    margin-right: auto;
    padding: 6px 14px;
    background: linear-gradient(135deg,#0f172a,#1a3a6b);
    color: #C9A84C;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    display: flex; align-items: center; gap: 5px;
    transition: opacity 0.15s;
}
.rcp-add-btn:hover { opacity: 0.85; }

/* شبكة الفئات */
.rcp-dens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0;
    padding: 16px;
    gap: 12px;
    background: #fff;
}

.rcp-den-card {
    background: linear-gradient(135deg, var(--opc,#3b82f6), color-mix(in srgb, var(--opc,#3b82f6) 70%, #000));
    border-radius: 14px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    position: relative;
    transition: transform 0.18s, box-shadow 0.18s;
    cursor: default;
}
.rcp-den-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.rcp-den-card.empty {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
}
.rcp-den-card.empty .rcp-den-val { color: #94a3b8; }
.rcp-den-card.empty .rcp-den-count { color: #cbd5e1; }
.rcp-den-card.empty .rcp-den-label { color: #94a3b8; }
.rcp-den-card.empty .rcp-den-sold  { color: #cbd5e1; }
.rcp-den-card.new-den {
    background: #f8fafc;
    border: 2.5px dashed #cbd5e1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 100px;
}
.rcp-den-card.new-den:hover { border-color: #C9A84C; background: #fffbeb; }

.rcp-den-top { display: flex; align-items: baseline; gap: 2px; }
.rcp-den-val { font-size: 24px; font-weight: 900; color: #fff; line-height: 1; }
.rcp-den-cur { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.7); }
.rcp-den-count { font-size: 32px; font-weight: 900; color: #fff; line-height: 1; margin-top: 4px; }
.rcp-den-label { font-size: 10px; color: rgba(255,255,255,0.65); font-weight: 700; }
.rcp-den-sold  { font-size: 9px; color: rgba(255,255,255,0.5); margin-top: 2px; min-height: 12px; }
.rcp-den-actions { display: flex; gap: 5px; margin-top: 8px; width: 100%; }

.rcp-btn-sell {
    flex: 1;
    padding: 6px 4px;
    background: rgba(0,0,0,0.25);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    transition: all 0.15s;
}
.rcp-btn-sell:hover { background: rgba(0,0,0,0.45); }

.rcp-btn-add {
    flex: 1;
    padding: 6px 4px;
    background: rgba(201,168,76,0.2);
    border: 1.5px solid rgba(201,168,76,0.5);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    color: #C9A84C;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    transition: all 0.15s;
}
.rcp-btn-add:hover { background: rgba(201,168,76,0.35); }

.rcp-btn-more {
    padding: 6px 8px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    transition: all 0.15s;
}
.rcp-btn-more:hover { background: rgba(255,255,255,0.2); color: #fff; }
.rcp-den-card.empty .rcp-btn-more { color: #94a3b8; border-color: #e2e8f0; background: #fff; }
.rcp-den-card.empty .rcp-btn-more:hover { color: #C9A84C; border-color: #C9A84C; }

@media (max-width: 640px) {
    .rcp-header { flex-direction: column; align-items: stretch; }
    .rcp-machine-box { min-width: unset; }
    .rcp-dens-grid { grid-template-columns: repeat(3, 1fr); }
}

/* low-stock den card */
.rcp-den-card.low-stock { box-shadow: 0 0 0 3px #f59e0b; }
.rcp-den-warn-badge {
    position:absolute; top:6px; left:6px;
    font-size:10px; background:#f59e0b; color:#fff;
    padding:1px 7px; border-radius:20px; font-weight:800;
}
.rcp-machine-box.low { box-shadow:0 0 0 2px #ef4444, 0 0 20px #ef444440; }
.rcp-machine-val.warn { color:#fca5a5 !important; }
.rcp-machine-sell-btn {
    display:block; width:100%; margin-top:8px;
    padding:7px 10px;
    background:linear-gradient(135deg,rgba(255,255,255,.15),rgba(255,255,255,.05));
    border:1.5px solid rgba(255,255,255,.25); border-radius:8px;
    cursor:pointer; font-family:'Cairo',Arial,sans-serif;
    font-size:11px; font-weight:800; color:#fff;
    display:flex; align-items:center; justify-content:center; gap:6px;
    transition:all .15s;
}
.rcp-machine-sell-btn:hover { background:rgba(255,255,255,.25); }

/* ── Expiry Report ── */
.er-filter-btn {
    padding: 7px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    color: #64748b;
    transition: all .18s;
}
.er-filter-btn:hover { background: #f1f5f9; }
.er-filter-btn.active { background: #0f172a; color: #C9A84C; border-color: #0f172a; }
.er-filter-btn.er-f-red.active   { background: #dc2626; color: #fff; border-color: #dc2626; }
.er-filter-btn.er-f-orange.active { background: #ea580c; color: #fff; border-color: #ea580c; }
.er-filter-btn.er-f-yellow.active { background: #ca8a04; color: #fff; border-color: #ca8a04; }
.er-days-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    margin-top: 3px;
}
.er-card-loading {
    text-align: center; padding: 20px; color: #C9A84C; font-size: 24px;
}
