/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   تنسيقات القائمة الجانبية الموحدة
   (نسخة واحدة نظيفة بدل 3 نسخ مكررة كانت متضاربة الأولوية)
   ============================================================ */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e, #2d1b3d);
    color: white;
    padding: 20px 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
.sidebar-header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-header h2 {
    color: #FF6B9D !important;
    background: none !important;
    -webkit-text-fill-color: #FF6B9D !important;
    font-size: 20px;
}
.sidebar-header p {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 12px;
}
.sidebar-menu {
    list-style: none;
    padding: 15px 10px;
}
/* عناوين الأقسام (مبيعات/عملاء/مخزون...) - مجرد فواصل غير قابلة للضغط */
.sidebar-menu li.sidebar-section-title {
    padding: 14px 14px 6px;
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 107, 157, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
    user-select: none;
}
.sidebar-menu li.sidebar-section-title:hover {
    color: #FF6B9D;
}
.sidebar-menu li.sidebar-section-title .section-arrow {
    font-size: 10px;
    transition: transform 0.25s ease;
    color: rgba(255, 107, 157, 0.6);
}
.sidebar-menu li.sidebar-section-title.collapsed .section-arrow {
    transform: rotate(-90deg);
}
.sidebar-menu li.sidebar-section-title:first-child {
    border-top: none;
}
.sidebar-menu li[data-page] {
    margin: 3px 0;
    border-radius: 10px;
    transition: all 0.3s;
}
.sidebar-menu li[data-page]:hover {
    background: rgba(255, 107, 157, 0.15);
}
.sidebar-menu li[data-page].active {
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.25), rgba(255, 107, 157, 0.1));
    border-right: 3px solid #FF4081;
}
/* مهم: الـ padding على الـ <a> نفسه مش على الـ <li>، والـ <a> بياخد
   100% من عرض وارتفاع الـ <li> - عشان كل بكسل في الصف اللي شكله قابل
   للضغط (بسبب لون الـ hover) يبقى فعليًا جزء من الرابط القابل للنقر،
   ومفيش "منطقة ميتة" في حواف الصف تحتاج تضغط عليها مرتين */
.sidebar-menu li[data-page] a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 12px 18px;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}
.sidebar-menu li[data-page]:hover a {
    color: white;
}
.sidebar-menu li[data-page].active a {
    color: white;
}
.sidebar-menu li[data-page] a i {
    width: 20px;
    text-align: center;
    color: #FF6B9D;
    font-size: 16px;
}

/* ===== زر فتح القائمة للشاشات الصغيرة ===== */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, #FF6B9D, #FF4081);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,64,129,0.3);
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255,64,129,0.4);
}

/* ===== Overlay للشاشات الصغيرة ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ===== استجابة للشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .sidebar-toggle-btn {
        display: flex !important;
    }
    .main-content {
        margin-right: 0 !important;
        padding: 15px;
    }
    .header {
        padding-right: 60px !important;
    }
}

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background: #fdf2f8;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fce4ec;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF6B9D, #FF4081);
    border-radius: 10px;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 50%, #f48fb1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(255, 64, 129, 0.2);
    width: 90%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.login-header {
    background: linear-gradient(135deg, #FF6B9D, #FF4081);
    padding: 40px;
    text-align: center;
    color: white;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.login-header h1 {
    font-size: 32px;
    position: relative;
    z-index: 1;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.login-form {
    padding: 40px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FF6B9D, #FF4081);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 64, 129, 0.4);
}

.btn-pink {
    background: linear-gradient(135deg, #FF6B9D, #FF4081);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.2);
}

.btn-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 64, 129, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin: 2px;
    transition: all 0.3s;
}

.btn-edit:hover {
    transform: scale(1.05);
}

.btn-delete {
    background: linear-gradient(135deg, #ef5350, #d32f2f);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin: 2px;
    transition: all 0.3s;
}

.btn-delete:hover {
    transform: scale(1.05);
}

.btn-success {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-success:hover {
    transform: scale(1.05);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    transform: scale(1.05);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-right: 280px;
    padding: 25px;
    min-height: 100vh;
}

.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info span {
    color: #555;
}

.logout-btn {
    background: linear-gradient(135deg, #ef5350, #d32f2f);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
}

.logout-btn:hover {
    transform: scale(1.05);
}

/* ===== PAGES ===== */
.page-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF6B9D, #FF4081);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 64, 129, 0.15);
}

.stat-card h3 {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF6B9D, #FF4081);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #FF4081; /* احتياطي لو المتصفح مش بيدعم background-clip:text خالص */
}

/* ===== CHARTS ===== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

canvas {
    max-height: 280px;
}

/* ===== SEARCH SECTION ===== */
.search-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
}

.search-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-row .search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 2px solid #fce4ec;
    border-radius: 15px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
    background: white;
}

.search-row .search-input:focus {
    outline: none;
    border-color: #FF4081;
    box-shadow: 0 0 0 4px rgba(255, 64, 129, 0.1);
}

.search-row .search-select {
    padding: 12px 20px;
    border: 2px solid #fce4ec;
    border-radius: 15px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.search-row .search-select:focus {
    outline: none;
    border-color: #FF4081;
}

/* ===== CARDS GRID ===== */
.customers-grid,
.products-grid,
.employees-grid,
.invoices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF6B9D, #FF4081);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 64, 129, 0.15);
}

.product-card .product-image-container {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #fce4ec;
    position: relative;
}

.product-card .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
}

.product-card .product-image-container img:hover {
    transform: scale(1.05);
}

.product-card .product-image-container .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
    color: #f48fb1;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
}

.product-card .product-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.product-card .product-category {
    color: #888;
    font-size: 14px;
    margin: 5px 0;
}

.product-card .product-price {
    font-size: 20px;
    font-weight: bold;
    color: #FF4081;
    margin: 10px 0;
}

.product-card .product-stock {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.product-card .product-stock.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.product-card .product-stock.low-stock {
    background: #fff3e0;
    color: #e65100;
}

.product-card .product-stock.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

/* ===== INVOICE CARDS ===== */
.invoice-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.invoice-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF6B9D, #FF4081);
}

.invoice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 64, 129, 0.15);
}

.invoice-card .invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #fce4ec;
}

.invoice-card .invoice-number {
    font-weight: bold;
    color: #FF4081;
    font-size: 16px;
}

.invoice-card .invoice-date {
    color: #888;
    font-size: 14px;
}

.invoice-card .invoice-customer {
    font-size: 16px;
    margin: 5px 0;
}

.invoice-card .invoice-employee {
    color: #666;
    font-size: 14px;
}

.invoice-card .invoice-shipping {
    font-size: 14px;
    color: #888;
}

.invoice-card .invoice-totals {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: #fdf2f8;
    border-radius: 12px;
}

.invoice-card .invoice-totals span {
    font-weight: bold;
}

.invoice-card .invoice-totals .total {
    color: #FF4081;
    font-size: 18px;
}

.invoice-card .invoice-status {
    display: inline-block;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 12px;
}

.invoice-card .invoice-status.delivered {
    background: #e8f5e9;
    color: #2e7d32;
}

.invoice-card .invoice-status.pending {
    background: #fff3e0;
    color: #e65100;
}

.invoice-card .invoice-items-preview {
    font-size: 13px;
    color: #666;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.invoice-card .invoice-items-preview span {
    display: inline-block;
    background: #fce4ec;
    padding: 2px 10px;
    border-radius: 10px;
    margin: 2px;
    font-size: 12px;
}

/* ===== CUSTOMER & EMPLOYEE CARDS ===== */
.customer-card,
.employee-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.08);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.customer-card::before,
.employee-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF6B9D, #FF4081);
}

.customer-card:hover,
.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 64, 129, 0.15);
}

.customer-card .customer-name,
.employee-card .employee-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.customer-card .customer-phone,
.employee-card .employee-phone {
    color: #666;
    font-size: 14px;
}

.customer-card .customer-address {
    color: #888;
    font-size: 13px;
    margin-top: 5px;
}

.employee-card .employee-commission {
    color: #FF4081;
    font-weight: bold;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 30px;
    width: 90%;
    max-width: 850px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 1050px;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #fce4ec;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 30px 30px 0 0;
    z-index: 10;
}

.modal-header h3 {
    font-size: 22px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #FF4081;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #fce4ec;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF4081;
    box-shadow: 0 0 0 4px rgba(255, 64, 129, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* ===== INVOICE ITEMS ===== */
.invoice-items-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.invoice-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: #fdf2f8;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #fce4ec;
}

.invoice-item-row .item-number {
    font-weight: bold;
    color: #FF4081;
    min-width: 30px;
}

.invoice-item-row select {
    flex: 2;
    min-width: 120px;
    padding: 8px 12px;
    border: 2px solid #fce4ec;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    background: white;
}

.invoice-item-row input {
    flex: 1;
    min-width: 70px;
    padding: 8px 12px;
    border: 2px solid #fce4ec;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
}

.invoice-item-row .item-total {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #FF4081;
    border: 2px solid #fce4ec;
}

.btn-remove-item {
    background: #ef5350;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove-item:hover {
    transform: scale(1.1);
}

.btn-add-item {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-add-item:hover {
    transform: scale(1.05);
}

/* ===== INVOICE SUMMARY ===== */
.invoice-summary {
    background: linear-gradient(135deg, #fdf2f8, #fce4ec);
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
}

.invoice-summary div {
    margin: 5px 0;
    font-size: 16px;
}

.invoice-summary .total {
    font-size: 22px;
    color: #FF4081;
    font-weight: bold;
}

/* ===== QUICK ADD ===== */
.quick-add-customer {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 5px;
    flex-wrap: wrap;
}

.quick-add-customer input {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border: 2px solid #fce4ec;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
}

.quick-add-customer button {
    padding: 8px 15px;
    background: #FF4081;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* ===== QUICK PRODUCTS ===== */
.quick-products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding: 10px;
    background: #fdf2f8;
    border-radius: 12px;
    margin-bottom: 10px;
}

.quick-product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 5px 12px;
    border-radius: 10px;
    border: 1px solid #fce4ec;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-product-item:hover {
    border-color: #FF4081;
    transform: scale(1.02);
}

.quick-product-item img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
}

.quick-product-item .product-name {
    font-size: 13px;
}

.quick-product-item .product-price {
    color: #FF4081;
    font-weight: bold;
    font-size: 12px;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 60px;
    color: #888;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #fce4ec;
    border-radius: 50%;
    border-top-color: #FF4081;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== MESSAGES ===== */
.error-message,
.success-message {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 15px 25px;
    border-radius: 15px;
    z-index: 3000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 90%;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    border-right: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    border-right: 4px solid #2e7d32;
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .invoice-item-row {
        flex-direction: column;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .customers-grid,
    .products-grid,
    .employees-grid,
    .invoices-grid {
        grid-template-columns: 1fr;
    }
    .search-row {
        flex-direction: column;
    }
    .search-row .search-input,
    .search-row .search-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== INVOICE ITEMS SCROLL ===== */
.invoice-items-container::-webkit-scrollbar {
    width: 6px;
}

.invoice-items-container::-webkit-scrollbar-track {
    background: #fce4ec;
    border-radius: 10px;
}

.invoice-items-container::-webkit-scrollbar-thumb {
    background: #FF4081;
    border-radius: 10px;
}

/* ===== SEARCH RESULTS COUNT ===== */
.search-results-count {
    color: #888;
    font-size: 14px;
    margin-top: 10px;
}

/* ============================================================
   خط فاصل بين أعمدة أي جدول بيانات في الموقع كله - بلون واضح
   ومختلف عن باقي الحدود الوردية الفاتحة، من غير ما يأثر على التصميم
   (بنستخدم border-left عشان مايتعارضش مع فواصل التجميع الخاصة
   الموجودة أصلاً زي .col-sep في صفحة الإجمالي الشهري)
   ============================================================ */
.data-table td,
.data-table th,
.invoices-table td,
.invoices-table th,
.aramex-table td,
.aramex-table th {
    border-left: 1px solid #d8c4cc;
}
.data-table td:last-child,
.data-table th:last-child,
.invoices-table td:last-child,
.invoices-table th:last-child,
.aramex-table td:last-child,
.aramex-table th:last-child {
    border-left: none;
}