/* ==========================================================================
   نظام نقاط البيع الذهبي v5 الملكي - ملف التصميم الشامل وفرد شاشات اللاب توب
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --bg-main: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1e1e1e;
    --gold: #d4af37;
    --gold-dark: #aa8c2c;
    --gold-light: #f3e5ab;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --border-color: #222222;
    --border-gold: #aa8c2c;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #e67e22;
    --sidebar-width: 260px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
}

/* عناصر مساعدة للتنقل والاخفاء */
.hidden {
    display: none !important;
}
.text-center { text-align: center !important; }
.text-muted { color: var(--text-gray) !important; }
.text-danger { color: var(--danger) !important; }
.text-warn { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }

/* ==========================================================================
   1. شاشة التحميل الملكية (Splash Screen)
   ========================================================================== */
.splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.splash-content {
    text-align: center;
    width: 90%;
    max-width: 450px;
}
.logo-wrapper {
    width: 160px;
    height: 160px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    border: 3px solid var(--gold);
    padding: 5px;
    background: var(--bg-card);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}
.logo-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.splash-content h2 {
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
}
.splash-content p {
    color: var(--text-gray);
    margin-bottom: 25px;
    font-size: 1rem;
}
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #222222;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #333;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 10px;
    transition: width 0.1s linear;
}
.progress-percent {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
}
.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ==========================================================================
   2. الهيكل الرئيسي وفرد شاشة اللاب توب بالكامل 100%
   ========================================================================== */
.app-container {
    display: block;
    width: 100%;
    min-height: 100vh;
}
.main-header {
    height: 65px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.menu-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
    display: none; /* يظهر فقط في الموبايل */
}
.brand-info h1 {
    font-size: 1.25rem;
    color: var(--text-white);
}
.gold-badge {
    background-color: var(--gold);
    color: var(--bg-main);
    padding: 2px 6px;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    vertical-align: middle;
}
.brand-info p {
    font-size: 0.8rem;
    color: var(--gold);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pwa-btn {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-main);
    border: none;
    padding: 6px 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}
.pwa-btn:hover { transform: scale(1.03); }
.network-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    background: #1a1a1a;
    padding: 5px 12px;
    border-radius: 6px;
}
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-indicator.online { background-color: var(--success); box-shadow: 0 0 8px var(--success); }
.status-indicator.offline { background-color: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* تخطيط الصفحة المفرود */
.main-layout {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 65px);
}
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
    gap: 5px;
}
.nav-item {
    background: none;
    border: none;
    width: 100%;
    padding: 12px 15px;
    color: var(--text-gray);
    text-align: right;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}
.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    color: var(--gold);
}
.nav-item:hover, .nav-item.active {
    background-color: #1a1a1a;
    color: var(--gold-light);
    border-right: 3px solid var(--gold);
}
.debt-count-badge {
    background-color: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 10px;
    margin-right: auto;
}
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: #555;
    text-align: center;
}

/* منطقة المحتوى - مفرودة بالكامل */
.content-area {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 65px);
}
@media (min-width: 992px) {
    .content-area, .main-layout {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   3. كاردات الإحصائيات الـ 4 العلوية
   ========================================================================== */
.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.counter-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.counter-card i {
    font-size: 2rem;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
    padding: 12px;
    border-radius: 8px;
}
.counter-info span {
    font-size: 0.85rem;
    color: var(--text-gray);
    display: block;
    margin-bottom: 4px;
}
.counter-info h3 {
    font-size: 1.4rem;
    color: var(--text-white);
    font-weight: bold;
}
.counter-card.total-debts i { color: var(--danger); background: rgba(231, 76, 60, 0.05); }

/* ==========================================================================
   4. حل مشكلة كاردات المخزون الـ 6 لتصبح مستطيلات مفرودة تماماً بالعرض للاب توب
   ========================================================================== */
.premium-rect-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 أفقية كاملة في صف واحد للكمبيوتر */
    gap: 10px;
    margin-bottom: 25px;
}
.rect-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* الأيقونة والاسم يمين والقيمة يسار */
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 52px;
}
.rect-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--gold);
    transform: translateY(-2px);
}
.rect-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rect-right i {
    font-size: 1.2rem;
    color: var(--gold);
}
.rect-right span {
    font-size: 0.9rem;
    color: var(--text-white);
    font-weight: 500;
}
.rect-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--gold);
}
.rect-card.cat-warn { border-right: 4px solid var(--warning); }
.rect-card.cat-danger { border-right: 4px solid var(--danger); }

/* ==========================================================================
   5. الجداول واللوحات المقسمة في النظام
   ========================================================================== */
.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.split-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}
.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
}
.box-header h3, .split-box h3 {
    font-size: 1.05rem;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gold-link-btn {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
}
.gold-link-btn:hover { text-decoration: underline; }

/* الجداول الفخمة الملكية */
.table-container {
    width: 100%;
    overflow-x: auto;
}
.table-container.bound-height {
    max-height: 480px;
    overflow-y: auto;
}
.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.9rem;
}
.premium-table th {
    background-color: #0f0f0f;
    color: var(--gold);
    padding: 12px 10px;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}
.premium-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #1a1a1a;
    color: #e0e0e0;
}
.premium-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* الأزرار السريعة لوحة التحكم */
.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
.action-btn {
    background-color: #1a1a1a;
    color: var(--text-white);
    border: 1px solid #333;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.action-btn i { color: var(--gold); font-size: 1.1rem; width: 20px; }
.action-btn:hover { background-color: #222; border-color: var(--gold); }
.action-btn.gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: #000; font-weight: bold; border: none; }
.action-btn.gold i { color: #000; }
.action-btn.danger { border-color: rgba(231, 76, 60, 0.4); background: rgba(231, 76, 60, 0.05); }
.action-btn.danger i { color: var(--danger); }

/* ==========================================================================
   6. شاشة المبيعات وبناء الفاتورة الاحترافية
   ========================================================================== */
.sales-workspace {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}
.invoice-builder-panel, .products-lookup-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}
.section-title {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 15px;
    border-bottom: 1px solid #222;
    padding-bottom: 6px;
}

/* اختيار العميل الكريم وطريقة السداد */
.customer-selection-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 15px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
    margin-bottom: 12px;
}
.form-group label {
    font-size: 0.85rem;
    color: var(--text-gray);
}
.form-control {
    background-color: #0f0f0f;
    border: 1px solid #333;
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
}
.form-control:focus { border-color: var(--gold); }
.inline-add-btn {
    background-color: #1c1c1c;
    border: 1px solid #333;
    color: var(--gold);
    padding: 10px 14px;
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.payment-method-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.radio-label {
    cursor: pointer;
    width: 100%;
}
.radio-label input { display: none; }
.custom-radio {
    display: block;
    padding: 10px;
    background-color: #0f0f0f;
    border: 1px solid #222;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-gray);
    transition: all 0.2s;
}
.radio-label input:checked + .custom-radio {
    border-color: var(--gold);
    color: var(--gold-light);
    background-color: rgba(212, 175, 55, 0.05);
}

/* سلة أصناف الفاتورة الحالية */
.invoice-items-basket h3 { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 8px; }
.basket-scroll {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
    background: #0d0d0d;
}
.basket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.basket-table th { background-color: #151515; color: var(--gold); padding: 8px; border-bottom: 1px solid #222; }
.basket-table td { padding: 8px; border-bottom: 1px solid #151515; vertical-align: middle; }
.basket-qty-input { width: 55px; background: #000; border: 1px solid #333; color: white; text-align: center; padding: 4px; border-radius: 4px; }
.remove-basket-item-btn { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1rem; }

/* ملخص الفاتورة المالي والسكانر */
.invoice-summary-box {
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}
.summary-line strong { font-size: 1.2rem; color: var(--gold); }
.submit-invoice-btn {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: black;
    border: none;
    padding: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* سكانر باركود مخصص */
.barcode-activation-bar {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.barcode-status-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.barcode-toggle-btn {
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
}
.barcode-toggle-btn.off { background: #222; color: var(--text-gray); }
.barcode-toggle-btn.on { background: var(--success); color: black; box-shadow: 0 0 8px var(--success); }
.barcode-hidden-field {
    width: 100%;
    background-color: #000;
    border: 1px solid #333;
    padding: 8px;
    color: var(--success);
    font-family: monospace;
    font-size: 0.9rem;
    border-radius: 4px;
    outline: none;
}
.barcode-hidden-field:focus { border-color: var(--success); }

.search-filter-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.search-filter-box.full-width { width: 100%; }
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}
.search-input-wrapper i {
    position: absolute;
    right: 12px;
    top: 13px;
    color: #555;
}
.search-input-wrapper .form-control {
    padding-right: 35px;
}
.shelf-filter { width: 150px; }

/* كاردات البضاعة في شاشة البيع السريع */
.products-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 2px;
}
.sales-prod-item-card {
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 105px;
    position: relative;
}
.sales-prod-item-card:hover { border-color: var(--gold); }
.card-title-text { font-size: 0.9rem; font-weight: bold; color: white; margin-bottom: 4px; display: block; }
.card-meta-line { font-size: 0.75rem; color: var(--text-gray); margin-bottom: 6px; }
.card-bottom-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card-price-tag { font-size: 1.1rem; color: var(--gold); font-weight: bold; }
.quick-add-to-inv-btn {
    background: #1a1a1a;
    border: 1px solid var(--gold);
    color: var(--gold);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.quick-add-to-inv-btn:hover { background: var(--gold); color: black; }
.out-of-stock-badge {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    color: var(--danger);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 6px;
}

/* حقول مخصصة للمودالات المتكررة */
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gold-input { border-color: var(--gold-dark); font-size: 1.2rem; font-weight: bold; color: var(--gold-light); text-align: center; }

/* ==========================================================================
   7. النوافذ المنبثقة (Modal Overlays)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background-color: var(--bg-card);
    border: 1px solid var(--gold-dark);
    width: 90%;
    max-width: 650px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.15);
}
.modal-box.compact { max-width: 460px; }
.modal-header {
    background-color: #0f0f0f;
    padding: 15px;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { color: var(--gold); font-size: 1.1rem; }
.close-modal-btn { background: none; border: none; color: #777; font-size: 1.2rem; cursor: pointer; }
.close-modal-btn:hover { color: white; }
.modal-body { padding: 20px; max-height: 75vh; overflow-y: auto; }
.modal-footer { background-color: #0f0f0f; padding: 12px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #222; }

.btn-cancel { background: #222; color: white; border: 1px solid #333; padding: 8px 18px; border-radius: 6px; cursor: pointer; }
.btn-confirm-gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: black; font-weight: bold; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; }
.btn-confirm-danger { background: var(--danger); color: white; font-weight: bold; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; }

.quick-price-chips { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.quick-price-chips span { background: #1c1c1c; border: 1px solid #333; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; color: var(--gold-light); }
.quick-price-chips span:hover { background: var(--gold); color: black; }
.debt-info-banner { background: rgba(231, 76, 60, 0.1); border: 1px solid rgba(231, 76, 60, 0.3); padding: 10px; border-radius: 6px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

/* ==========================================================================
   8. ورقة إيصال الفاتورة الملكي الجاهز للطباعة والواتساب
   ========================================================================== */
.receipt-modal-box {
    background-color: #fff;
    color: #000;
    width: 95%;
    max-width: 420px;
    border-radius: 8px;
    padding: 15px;
    max-height: 90vh;
    overflow-y: auto;
}
.receipt-actions-top { display: flex; gap: 8px; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.receipt-print-action-btn { flex-grow: 1; padding: 8px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.8rem; text-align: center; }
.receipt-print-action-btn.print { background: #2ecc71; color: white; }
.receipt-print-action-btn.whatsapp { background: #25d366; color: white; }
.receipt-print-action-btn.close { background: #e74c3c; color: white; }

.print-receipt-paper {
    background: white;
    color: black;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}
.receipt-header-center { text-align: center; margin-bottom: 10px; }
.receipt-logo-circle { width: 75px; height: 75px; border-radius: 50%; border: 2px solid #000; margin: 0 auto 8px auto; overflow: hidden; }
.receipt-logo-circle img { width: 100%; height: 100%; object-fit: cover; }
.receipt-header-center h2 { font-size: 1.15rem; font-weight: bold; margin-bottom: 3px; }
.store-subtext { font-size: 0.75rem; color: #444; line-height: 1.2; margin-bottom: 4px; }
.receipt-divider-dash { border-top: 1px dashed #000; margin: 8px 0; }
.receipt-meta-info-block p { margin-bottom: 4px; }
.receipt-items-table-print { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin: 8px 0; }
.receipt-items-table-print th { text-align: right; border-bottom: 1px solid #000; padding: 4px 2px; }
.receipt-items-table-print td { padding: 5px 2px; border-bottom: 1px dashed #eee; }
.receipt-financial-totals-block { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.financial-row { display: flex; justify-content: space-between; }
.text-danger-receipt { font-weight: bold; color: #000; }
.receipt-footer-thankyou { text-align: center; margin-top: 15px; font-size: 0.75rem; }
.whatsapp-alert-text { font-size: 0.7rem; border: 1px solid #000; padding: 6px; margin-bottom: 10px; border-radius: 4px; font-weight: bold; }

/* إعدادات الطباعة للكمبيوتر لمنع خروج الألوان الورقة خارج الإيصال */
@media print {
    body * { visibility: hidden; }
    #printableReceiptPaperArea, #printableReceiptPaperArea * { visibility: visible; }
    #printableReceiptPaperArea { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
}

/* ==========================================================================
   9. التوافق الكامل مع شاشات الموبايل الرشيقة
   ========================================================================== */
@media (max-width: 991px) {
    .menu-btn { display: block; }
    .sidebar {
        position: fixed;
        right: 0; top: 65px; bottom: 0;
        z-index: 500;
        transform: translateX(100%);
    }
    .sidebar.open { transform: translateX(0); }
    .counters-grid { grid-template-columns: repeat(2, 1fr); }
    .premium-rect-grid { grid-template-columns: repeat(2, 1fr); } /* مستطيلين جنب بعض بالموبايل */
    .dashboard-split { grid-template-columns: 1fr; }
    .sales-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .counters-grid { grid-template-columns: 1fr; }
    .premium-rect-grid { grid-template-columns: 1fr; } /* مستطيل واحد بالطول للموبايلات الصغيرة جدا */
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .payment-method-row { grid-template-columns: 1fr; }
    .products-cards-grid { grid-template-columns: 1fr; }
}
