/* Dashboard CSS - Modern Responsive Admin Panel */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    direction: rtl;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ===== RESPONSIVE SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1001;
    right: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-right-color: #fff;
}

.nav-item i {
    margin-left: 0.75rem;
    font-size: 1.1rem;
}

/* ===== RESPONSIVE MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-right: 280px;
    min-height: 100vh;
    transition: margin-right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    right: 0;
    left: 280px;
    z-index: 1000;
    height: 70px;
    transition: left 0.3s ease;
}

.content-wrapper {
    flex: 1;
    margin-top: 70px;
    overflow-y: auto;
    height: calc(100vh - 70px);
    scroll-behavior: smooth;
}

.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: #f0f0f0;
}

.header h1 {
    font-size: 1.5rem;
    color: #333;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .sidebar {
        width: 300px;
    }
    
    .main-content {
        margin-right: 300px;
    }
    
    .header {
        padding: 1.5rem 3rem;
        left: 300px;
    }
    
    .content-area {
        padding: 2rem 3rem;
    }
}

/* Standard Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-right: 280px;
    }
    
    .header {
        left: 280px;
    }
    
    .content-area {
        padding: 1.5rem 2rem;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .sidebar {
        width: 260px;
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .header {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header {
        padding: 1rem 1.5rem;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .content-area {
        padding: 1rem 1.5rem;
    }
    
    /* Overlay for sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
    .sidebar {
        width: 100%;
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .header {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .sidebar-header {
        padding: 1.5rem 1rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.3rem;
    }
    
    .nav-item {
        padding: 0.8rem 1rem;
    }
    
    /* Overlay for sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .header {
        padding: 0.8rem;
        height: 60px;
    }
    
    .header h1 {
        font-size: 1.1rem;
    }
    
    .content-wrapper {
        margin-top: 60px;
        height: calc(100vh - 60px);
        padding: 0.8rem;
    }
    
    .sidebar-header {
        padding: 1rem 0.8rem;
    }
    
    .nav-item {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
    }
}

.header h1 {
    color: #333;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* ===== PRODUCT ADDONS STYLES ===== */
.addon-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.addon-name {
    flex: 2;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.addon-price {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.addon-item .btn {
    min-width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart Addons Styles */
.cart-addons {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cart-addons h5 {
    margin-bottom: 0.75rem;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.addons-slider {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.addons-slider::-webkit-scrollbar {
    height: 6px;
}

.addons-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.addons-slider::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.addon-card {
    min-width: 140px;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.addon-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.addon-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.addon-card .addon-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    border: none;
    background: none;
    color: inherit;
    text-align: center;
    width: 100%;
}

.addon-card .addon-price {
    font-size: 0.8rem;
    opacity: 0.8;
    border: none;
    background: none;
    color: inherit;
    text-align: center;
    width: 100%;
}

.addon-card.selected .addon-price {
    opacity: 1;
    font-weight: 600;
}

/* Mobile Addon Styles */
@media (max-width: 767px) {
    .addon-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .addon-name,
    .addon-price {
        flex: none;
        width: 100%;
    }
    
    .addon-card {
        min-width: 120px;
        padding: 0.5rem;
    }
    
    .addon-card .addon-name {
        font-size: 0.8rem;
    }
    
    .addon-card .addon-price {
        font-size: 0.75rem;
    }
}

/* Order Details Addon Styles */
.order-addons {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 3px solid #2196f3;
}

.order-addons .addon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.order-addons .addon-tag {
    background: #2196f3;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.order-addons .addons-total {
    margin-top: 0.5rem;
    font-weight: 600;
    color: #1976d2;
    font-size: 0.85rem;
}

/* Sections */
.section {
    display: none;
    padding: 2rem;
}

.section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: #4CAF50; }
.stat-card:nth-child(2) .stat-icon { background: #2196F3; }
.stat-card:nth-child(3) .stat-icon { background: #FF9800; }
.stat-card:nth-child(4) .stat-icon { background: #9C27B0; }

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #333;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.action-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 2rem;
}

/* Status Buttons - Modern Design */
.status-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.status-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 140px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.status-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.status-btn:hover::before {
    left: 100%;
}

.status-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.status-btn.active {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* All Orders Button */
.status-btn[data-status="all"] {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.status-btn[data-status="all"]:hover {
    background: linear-gradient(145deg, #5a6fd8, #6a4190);
}

/* New Orders Button */
.status-btn[data-status="جديد"] {
    background: linear-gradient(145deg, #ff6b6b, #ee5a52);
    color: white;
}

.status-btn[data-status="جديد"]:hover {
    background: linear-gradient(145deg, #ff5252, #e53935);
}

/* Preparing Orders Button */
.status-btn[data-status="تحضير"] {
    background: linear-gradient(145deg, #feca57, #ff9ff3);
    color: #2c2c2c;
}

.status-btn[data-status="تحضير"]:hover {
    background: linear-gradient(145deg, #fed330, #f39c12);
}

/* Confirmed Orders Button */
.status-btn[data-status="تأكيد"] {
    background: linear-gradient(145deg, #48cae4, #0077b6);
    color: white;
}

.status-btn[data-status="تأكيد"]:hover {
    background: linear-gradient(145deg, #0096c7, #023e8a);
}

/* Delivered Orders Button */
.status-btn[data-status="توصيل"] {
    background: linear-gradient(145deg, #06d6a0, #118ab2);
    color: white;
}

.status-btn[data-status="توصيل"]:hover {
    background: linear-gradient(145deg, #05c896, #0f7a9c);
}

/* Cancelled Orders Button */
.status-btn[data-status="إلغاء"] {
    background: linear-gradient(145deg, #6c757d, #495057);
    color: white;
}

.status-btn[data-status="إلغاء"]:hover {
    background: linear-gradient(145deg, #5a6268, #343a40);
}

.status-count {
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0.25rem;
}

.status-btn-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-btn-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Customer Filters - Modern Design */
.customer-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 1rem 2rem;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Special styling for customer types */
.filter-btn[onclick*="جديد"].active {
    background: linear-gradient(145deg, #48cae4, #0077b6);
    box-shadow: 0 6px 20px rgba(72, 202, 228, 0.4);
}

.filter-btn[onclick*="عادي"].active {
    background: linear-gradient(145deg, #06d6a0, #118ab2);
    box-shadow: 0 6px 20px rgba(6, 214, 160, 0.4);
}

.filter-btn[onclick*="VIP"].active {
    background: linear-gradient(145deg, #ffd60a, #ff8500);
    color: #2c2c2c;
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.4);
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
}

.search-container i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}
/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status.new { background: #fee; color: #dc3545; }
.status.preparing { background: #fff3cd; color: #856404; }
.status.confirmed { background: #d1ecf1; color: #0c5460; }
.status.delivered { background: #d4edda; color: #155724; }
.status.cancelled { background: #f8d7da; color: #721c24; }
.status.active { background: #d4edda; color: #155724; }
.status.inactive { background: #f8d7da; color: #721c24; }

/* Customer Type Badges */
.customer-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.customer-type-badge.new { 
    background: #d1ecf1; 
    color: #0c5460; 
}

.customer-type-badge.premium { 
    background: #fff3cd; 
    color: #856404; 
}

.customer-type-badge.vip { 
    background: linear-gradient(135deg, #ffd60a, #ff8500);
    color: #2c2c2c;
    font-weight: 600;
}

/* Customer Info Cards */
.customer-info-card,
.order-products-card,
.order-summary-card,
.order-status-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.customer-info-card h4,
.order-products-card h4,
.order-summary-card h4,
.order-status-card h4 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: #666;
}

/* Customer Orders List */
.customer-orders-list {
    max-height: 400px;
    overflow-y: auto;
}

.customer-order-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.customer-order-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.order-info strong {
    color: #333;
    font-size: 1rem;
}

.order-date {
    color: #666;
    font-size: 0.85rem;
    margin-left: 1rem;
}

.order-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-total {
    color: #28a745;
    font-size: 1.1rem;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-action-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
}

.order-action-btn.view {
    background: #667eea;
    color: white;
}

.order-action-btn.view:hover {
    background: #5a6fd8;
}

.order-action-btn.next-status {
    background: #28a745;
    color: white;
}

.order-action-btn.next-status:hover {
    background: #218838;
}

.order-action-btn.cancel {
    background: #dc3545;
    color: white;
}

.order-action-btn.cancel:hover {
    background: #c82333;
}

.order-action-btn.call {
    background: #17a2b8;
    color: white;
}

.order-action-btn.call:hover {
    background: #138496;
}

/* Image Upload Areas */
.image-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.image-upload-area p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Customer Filter Buttons */
.customer-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.customer-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.customer-filter-btn:hover::before {
    left: 100%;
}

.customer-filter-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.customer-filter-btn.active {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.customer-filter-btn .count {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.customer-filter-btn.active .count {
    background: rgba(255,255,255,0.3);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-success i {
    color: #28a745;
}

.notification-error i {
    color: #dc3545;
}

.notification-info i {
    color: #17a2b8;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5a6fd8; }

.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }

.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; }

.btn-warning { background: #ffc107; color: #212529; }
.btn-warning:hover { background: #e0a800; }

.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }

.btn-info { background: #17a2b8; color: white; }
.btn-info:hover { background: #138496; }

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
}

/* Customer Filters */
.customer-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 1rem 2rem;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Special styling for customer types */
.filter-btn[onclick*="جديد"].active {
    background: linear-gradient(145deg, #48cae4, #0077b6);
    box-shadow: 0 6px 20px rgba(72, 202, 228, 0.4);
}

.filter-btn[onclick*="عادي"].active {
    background: linear-gradient(145deg, #06d6a0, #118ab2);
    box-shadow: 0 6px 20px rgba(6, 214, 160, 0.4);
}

.filter-btn[onclick*="VIP"].active {
    background: linear-gradient(145deg, #ffd60a, #ff8500);
    color: #2c2c2c;
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.4);
}

/* Date Filters */
.date-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-filters input {
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 5px;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.report-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.report-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.report-period {
    color: #888;
    font-size: 0.8rem;
}

/* Report Filters */
.report-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.report-filters select {
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    min-width: 150px;
}

/* Reports Container */
.reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.report-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.report-section h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.5rem;
}

.report-container {
    max-height: 400px;
    overflow-y: auto;
}

.report-item {
    margin-bottom: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.report-item:hover {
    background: #e9ecef;
    transform: translateX(-2px);
}

.vip-customer-item {
    border-left-color: #ffd60a;
    background: linear-gradient(135deg, #fff9e6, #f8f9fa);
}

.vip-customer-item .customer-badge {
    background: linear-gradient(135deg, #ffd60a, #ff8500);
    color: #2c2c2c;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.performance-item {
    border-left-color: #06d6a0;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.performance-stat {
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.performance-stat-value {
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
}

.performance-stat-label {
    font-size: 0.8rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reports-container {
        grid-template-columns: 1fr;
    }
    
    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .performance-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modals - محسن للوسط */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    margin: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Order Details Modal Styles */
.order-details {
    display: grid;
    gap: 1.5rem;
}

.customer-info,
.order-products,
.order-summary,
.order-status,
.order-meta {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.customer-info h4,
.order-products h4,
.order-summary h4,
.order-status h4,
.order-meta h4 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid,
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-grid p,
.meta-grid p {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

.products-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
}

.product-item:hover {
    background: #f8f9fa;
}

.product-item:last-child {
    border-bottom: none;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.product-details h5 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.product-details p {
    margin: 0.25rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.product-quantity {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

.product-price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 5px;
}

.summary-item.total {
    background: #667eea;
    color: white;
    font-size: 1.1rem;
    border-radius: 8px;
}

.price {
    font-weight: bold;
    color: #28a745;
}

.summary-item.total .price {
    color: white;
}

.status-controls {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.status-controls .form-group {
    flex: 1;
    margin-bottom: 0;
}

.status-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.status-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Modal responsive design */
@media (max-width: 768px) {
    .info-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }
    
    .status-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .product-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    color: white;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.alert-success { background: #28a745; }
.alert-error { background: #dc3545; }
.alert-warning { background: #ffc107; color: #212529; }
.alert-info { background: #17a2b8; }

.alert button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .status-buttons {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .date-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}
/* Products Report Styles */
.products-report {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.products-report h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.products-report h3::before {
    content: '📊';
    font-size: 1.5rem;
}

.product-rating {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-rating.best {
    background: linear-gradient(145deg, #ffd60a, #ff8500);
    color: #2c2c2c;
}

.product-rating.good {
    background: linear-gradient(145deg, #06d6a0, #118ab2);
    color: white;
}

.product-rating.average {
    background: linear-gradient(145deg, #48cae4, #0077b6);
    color: white;
}

.product-rating.low {
    background: linear-gradient(145deg, #e9ecef, #ced4da);
    color: #495057;
}

.sales-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.revenue-amount {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Badge for category product count */
.badge {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Enhanced animations for status buttons */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.status-btn.active .status-count {
    animation: pulse 2s infinite;
}

/* Improved responsive design for new buttons */
@media (max-width: 768px) {
    .status-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .status-btn {
        min-width: auto;
        padding: 1rem;
    }
    
    .status-count {
        font-size: 1.5rem;
    }
    
    .status-btn-label {
        font-size: 0.8rem;
    }
    
    .customer-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.75rem 1rem;
        min-width: auto;
    }
}

/* Status Actions Styling */
.status-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.status-actions .btn {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.status-actions .badge {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Order Product Items */
.order-product-item {
    margin-bottom: 8px;
}

.order-product-item:last-child {
    margin-bottom: 0;
}

/* Status Filter Buttons */
.status-filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.status-filter-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.status-filter-btn:hover {
    background: #f8f9fa;
}

.status-filter-btn.active:hover {
    background: #0056b3;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .status-actions {
        min-width: 100px;
    }
    
    .status-actions .btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .status-filter-buttons {
        justify-content: center;
    }
    
    .status-filter-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* ===== DESKTOP & LARGE SCREENS OPTIMIZATION FOR DASHBOARD ===== */

/* Large Desktop (1440px and above) */
@media (min-width: 1440px) {
    .sidebar {
        width: 320px;
    }
    
    .main-content {
        margin-right: 320px;
    }
    
    .sidebar-header {
        padding: 2.5rem 2rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.8rem;
    }
    
    .nav-item {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
    
    .nav-item i {
        font-size: 1.3rem;
        margin-left: 1rem;
    }
    
    .header {
        padding: 1.5rem 3rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 2.5rem 3rem;
    }
    
    /* Tables for large screens */
    .table-responsive {
        overflow-x: visible;
    }
    
    .table th,
    .table td {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards improvements */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .stat-card {
        padding: 2rem;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    /* Modal improvements */
    .modal-dialog {
        max-width: 800px;
    }
    
    .modal-body {
        padding: 2rem;
    }
    
    /* Form improvements */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

/* Standard Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .sidebar {
        width: 300px;
    }
    
    .main-content {
        margin-right: 300px;
    }
    
    .header {
        padding: 1.2rem 2.5rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .content {
        padding: 2rem 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .stat-card {
        padding: 1.8rem;
    }
    
    .modal-dialog {
        max-width: 700px;
    }
}

/* Large Tablet - iPad Pro (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-right: 280px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .modal-dialog {
        max-width: 600px;
        margin: 2rem auto;
    }
}

/* Standard Tablet - iPad (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .header {
        padding: 1rem 1.5rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .modal-dialog {
        max-width: 90%;
        margin: 1rem auto;
    }
    
    /* Table improvements for tablets */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
}

/* Enhanced hover effects for desktop */
@media (min-width: 1024px) {
    .nav-item:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateX(-5px);
    }
    
    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .table tbody tr:hover {
        background-color: rgba(0, 123, 255, 0.05);
        transform: scale(1.01);
    }
}

/* Print optimizations for desktop */
@media print {
    .sidebar,
    .menu-toggle,
    .header {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .content {
        padding: 0 !important;
    }
    
    .modal {
        display: none !important;
    }
}

/* High DPI screens optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sidebar-header h2,
    .header h1 {
        font-weight: 500;
    }
    
    .table th,
    .table td {
        border-width: 0.5px;
    }
}
/* ===== RESPONSIVE DESIGN - MOBILE, TABLET, DESKTOP ===== */

/* Enhanced Mobile Design - Better UX for Phone */
@media (max-width: 768px) {
    /* Body and Container - Mobile */
    body {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    /* Sidebar - Mobile Enhanced */
    .sidebar {
        width: 85%;
        max-width: 300px;
        transform: translateX(-100%);
        position: fixed;
        z-index: 9999;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 1.5rem 1rem;
        background: rgba(0,0,0,0.1);
    }
    
    .sidebar-header h2 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }
    
    .sidebar-header p {
        font-size: 0.8rem;
    }
    
    .nav-item {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        border-radius: 0;
        margin: 0 0.5rem;
        border-radius: 8px;
        margin-bottom: 0.2rem;
    }
    
    .nav-item i {
        margin-left: 0.5rem;
        font-size: 1rem;
        width: 20px;
        text-align: center;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9998;
        backdrop-filter: blur(2px);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Main Content - Mobile Enhanced */
    .main-content {
        margin-right: 0;
        width: 100%;
        min-height: 100vh;
    }
    
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        color: #495057;
        transition: all 0.2s ease;
    }
    
    .menu-toggle:hover {
        background: #e9ecef;
        color: #212529;
    }
    
    /* Header - Mobile Enhanced */
    .header {
        padding: 0.8rem 1rem;
        flex-wrap: nowrap;
        gap: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        border-bottom: 1px solid #dee2e6;
        height: 60px;
    }
    
    .content-wrapper {
        margin-top: 60px;
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .header h1 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #495057;
        flex: 1;
        text-align: center;
    }
    
    .header-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    /* Dashboard Grid - Mobile Enhanced */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
        padding: 1rem 0.8rem !important;
    }
    
    /* Stats Cards - Mobile Enhanced */
    .stat-card {
        padding: 1rem !important;
        text-align: center;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        background: white !important;
        border: none !important;
    }
    
    .stat-card h3 {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.3rem !important;
    }
    
    .stat-card p {
        font-size: 0.85rem !important;
        color: #6c757d !important;
        margin: 0 !important;
    }
    
    .stat-card i {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
        opacity: 0.8;
    }
    
    /* Content Sections - Mobile Enhanced */
    .content-section {
        padding: 1rem 0.8rem !important;
        margin: 0 !important;
    }
    
    .section-header {
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
        border-bottom: 2px solid #e9ecef !important;
    }
    
    .section-header h2 {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        color: #495057 !important;
    }
    
    /* Tables - Mobile Enhanced */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: white;
        margin-bottom: 1rem;
    }
    
    table {
        min-width: 100%;
        font-size: 0.75rem;
        margin: 0;
    }
    
    th {
        background: #f8f9fa !important;
        padding: 0.6rem 0.4rem !important;
        font-weight: 600 !important;
        font-size: 0.7rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        border-bottom: 2px solid #dee2e6 !important;
    }
    
    td {
        padding: 0.6rem 0.4rem !important;
        border-bottom: 1px solid #f1f3f4 !important;
        vertical-align: middle !important;
    }
    
    tr:hover {
        background: #f8f9fa !important;
    }
    
    /* Buttons - Mobile Enhanced */
    .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.75rem !important;
        margin: 0.1rem !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
        min-height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.3rem !important;
    }
    
    .btn i {
        font-size: 0.8rem !important;
    }
    
    .btn-group {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.3rem !important;
        justify-content: center !important;
    }
    
    .btn-primary {
        background: #007bff !important;
        border-color: #007bff !important;
    }
    
    .btn-success {
        background: #28a745 !important;
        border-color: #28a745 !important;
    }
    
    .btn-warning {
        background: #ffc107 !important;
        border-color: #ffc107 !important;
        color: #212529 !important;
    }
    
    .btn-danger {
        background: #dc3545 !important;
        border-color: #dc3545 !important;
    }
    
    /* Action Buttons - Mobile Enhanced */
    .action-buttons {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.2rem !important;
        justify-content: center !important;
        min-width: 120px !important;
    }
    
    /* Modals - Mobile Enhanced */
    .modal {
        padding: 0.5rem !important;
    }
    
    .modal-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        max-height: 95vh !important;
        overflow-y: auto !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    }
    
    .modal-header {
        padding: 1rem !important;
        border-bottom: 1px solid #dee2e6 !important;
        background: #f8f9fa !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .modal-header h3 {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        margin: 0 !important;
        color: #495057 !important;
    }
    
    .modal-body {
        padding: 1rem !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
    
    .modal-footer {
        padding: 1rem !important;
        border-top: 1px solid #dee2e6 !important;
        background: #f8f9fa !important;
        border-radius: 0 0 12px 12px !important;
        display: flex !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }
    
    /* Forms - Mobile Enhanced */
    .form-group {
        margin-bottom: 1rem !important;
    }
    
    .form-group label {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: #495057 !important;
        margin-bottom: 0.3rem !important;
        display: block !important;
    }
    
    .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
        border-radius: 8px !important;
        border: 1px solid #ced4da !important;
        width: 100% !important;
        transition: border-color 0.2s ease !important;
    }
    
    .form-control:focus {
        border-color: #007bff !important;
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25) !important;
        outline: none !important;
    }
    
    select.form-control {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: left 0.75rem center !important;
        background-repeat: no-repeat !important;
        background-size: 1.5em 1.5em !important;
        padding-left: 2.5rem !important;
    }
    
    /* Reports - Mobile Enhanced */
    .reports-container {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1rem 0.8rem !important;
    }
    
    .reports-filters {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.8rem !important;
        background: white !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        margin-bottom: 1rem !important;
    }
    
    .filter-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.3rem !important;
    }
    
    .filter-group label {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        color: #495057 !important;
    }
    
    /* Status Indicators - Mobile Enhanced */
    .status-badge {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.7rem !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .status-pending {
        background: #fff3cd !important;
        color: #856404 !important;
        border: 1px solid #ffeaa7 !important;
    }
    
    .status-confirmed {
        background: #d4edda !important;
        color: #155724 !important;
        border: 1px solid #c3e6cb !important;
    }
    
    .status-delivered {
        background: #d1ecf1 !important;
        color: #0c5460 !important;
        border: 1px solid #bee5eb !important;
    }
    
    .status-cancelled {
        background: #f8d7da !important;
        color: #721c24 !important;
        border: 1px solid #f5c6cb !important;
    }
    
    /* Loading States - Mobile Enhanced */
    .loading {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 2rem !important;
        color: #6c757d !important;
        font-size: 0.9rem !important;
    }
    
    .loading i {
        margin-left: 0.5rem !important;
        animation: spin 1s linear infinite !important;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Empty States - Mobile Enhanced */
    .empty-state {
        text-align: center !important;
        padding: 3rem 1rem !important;
        color: #6c757d !important;
    }
    
    .empty-state i {
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
        opacity: 0.5 !important;
    }
    
    .empty-state h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        color: #495057 !important;
    }
    
    .empty-state p {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Floating Action Button - Mobile Enhanced */
    .fab {
        position: fixed !important;
        bottom: 2rem !important;
        left: 2rem !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 50% !important;
        background: #007bff !important;
        color: white !important;
        border: none !important;
        box-shadow: 0 4px 12px rgba(0,123,255,0.4) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.5rem !important;
        z-index: 1000 !important;
        transition: all 0.3s ease !important;
    }
    
    .fab:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 6px 16px rgba(0,123,255,0.5) !important;
    }
    
    /* Toast Notifications - Mobile Enhanced */
    .toast {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        z-index: 10000 !important;
        background: white !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        padding: 1rem !important;
        border-left: 4px solid #007bff !important;
    }
    
    .toast.success {
        border-left-color: #28a745 !important;
    }
    
    .toast.error {
        border-left-color: #dc3545 !important;
    }
    
    .toast.warning {
        border-left-color: #ffc107 !important;
    }
    
    .filter-group {
        width: 100% !important;
    }
    
    /* Charts - Mobile */
    .chart-container {
        height: 250px !important;
        margin: 1rem 0 !important;
    }
}

/* Tablet Design */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Sidebar - Tablet */
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-right: 250px;
    }
    
    .header {
        left: 250px;
    }
    
    /* Dashboard Grid - Tablet */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
    }
    
    /* Tables - Tablet */
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem !important;
    }
    
    /* Modals - Tablet */
    .modal-content {
        width: 80% !important;
        max-width: 600px !important;
    }
    
    /* Forms - Tablet */
    .form-row {
        display: flex !important;
        gap: 1rem !important;
    }
    
    .form-row .form-group {
        flex: 1 !important;
    }
    
    /* Reports - Tablet */
    .reports-filters {
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }
    
    .filter-group {
        min-width: 200px !important;
        flex: 1 !important;
    }
}

/* Desktop Design */
@media (min-width: 1025px) {
    /* Sidebar - Desktop */
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-right: 280px;
    }
    
    .header {
        left: 280px;
    }
    
    /* Dashboard Grid - Desktop */
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2rem !important;
        padding: 2rem !important;
    }
    
    /* Large Desktop */
    @media (min-width: 1440px) {
        .sidebar {
            width: 320px;
        }
        
        .main-content {
            margin-right: 320px;
        }
        
        .header {
            left: 320px;
        }
        
        .dashboard-grid {
            grid-template-columns: repeat(5, 1fr) !important;
        }
        
        .main-content {
            max-width: none;
        }
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-item {
        padding: 1.2rem 1.5rem !important;
    }
    
    .btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .form-control {
        min-height: 44px !important;
    }
    
    .table-container {
        -webkit-overflow-scrolling: touch;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .menu-toggle,
    .btn,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    .table-container {
        overflow: visible !important;
    }
    
    table {
        font-size: 0.8rem !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .header {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .stat-card {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .modal-content {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .form-control {
        background: #404040;
        color: #ffffff;
        border-color: #555;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Addons Modal Styles */
.addons-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.addons-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.addons-modal {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.addons-modal-backdrop.active .addons-modal {
    transform: scale(1);
}

.addons-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.addons-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close-addons-modal {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-addons-modal:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.addons-modal-body {
    padding: 1.5rem;
}

.product-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.product-details h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.base-price {
    color: #28a745;
    font-weight: 600;
    margin: 0;
}

.cart-addons h5 {
    margin-bottom: 1rem;
    color: #333;
}

.addons-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.addon-card {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.addon-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.addon-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.addon-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.addon-price {
    font-size: 0.9rem;
    opacity: 0.8;
}

.addon-card.selected .addon-price {
    opacity: 1;
    font-weight: 600;
}

.quantity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls button {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-controls button:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

#modalQuantity {
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.total-price {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.addons-modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.btn-cancel {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #6c757d;
    background: transparent;
    color: #6c757d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #6c757d;
    color: white;
}

.btn-add-to-cart {
    flex: 2;
    padding: 0.75rem;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Order Addons Display */
.order-addons {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.addon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.addon-tag {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.addons-total {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .addons-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .product-info img {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }
    
    .addons-slider {
        grid-template-columns: 1fr;
    }
    
    .addons-modal-footer {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-add-to-cart {
        flex: none;
    }
}
/* ===== RESPONSIVE TABLES ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background: #f8f9fa;
    font-weight: 600;
}

/* Mobile Table Styles */
@media (max-width: 767px) {
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Stack table for very small screens */
    .table-stack {
        display: block;
    }
    
    .table-stack thead {
        display: none;
    }
    
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }
    
    .table-stack tr {
        border: 1px solid #dee2e6;
        margin-bottom: 1rem;
        border-radius: 0.375rem;
        padding: 1rem;
        background: white;
    }
    
    .table-stack td {
        border: none;
        padding: 0.25rem 0;
        text-align: right;
    }
    
    .table-stack td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #666;
    }
}

/* ===== RESPONSIVE CARDS ===== */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile Card Styles */
@media (max-width: 767px) {
    .card-header {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .icon {
        font-size: 2rem;
    }
    
    .stat-card .number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 0.8rem;
    }
    
    .stat-card .icon {
        font-size: 1.8rem;
    }
    
    .stat-card .number {
        font-size: 1.3rem;
    }
}

/* ===== RESPONSIVE FORMS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-col {
    flex: 1;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* Mobile Form Styles */
@media (max-width: 767px) {
    .form-row {
        flex-direction: column;
        margin-right: 0;
        margin-left: 0;
    }
    
    .form-col {
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 1rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===== RESPONSIVE BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn-primary {
    color: #fff;
    background-color: #667eea;
    border-color: #667eea;
}

.btn-primary:hover {
    background-color: #5a6fd8;
    border-color: #5a6fd8;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Mobile Button Styles */
@media (max-width: 767px) {
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* ===== RESPONSIVE MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Mobile Modal Styles */
@media (max-width: 767px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
/* ===== CUSTOMER VIP SYSTEM ===== */
.customer-type {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.customer-type.new {
    background: #e3f2fd;
    color: #1976d2;
}

.customer-type.regular {
    background: #f3e5f5;
    color: #7b1fa2;
}

.customer-type.premium {
    background: #fff3e0;
    color: #f57c00;
}

.customer-type.vip {
    background: #ffebee;
    color: #d32f2f;
}

.customer-row.customer-vip {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 255, 255, 1) 10%);
    border-left: 4px solid #ffc107;
}

.customer-row.customer-premium {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 255, 255, 1) 10%);
    border-left: 4px solid #ff9800;
}

.customer-row.customer-regular {
    background: linear-gradient(90deg, rgba(156, 39, 176, 0.1) 0%, rgba(255, 255, 255, 1) 10%);
    border-left: 4px solid #9c27b0;
}

.customer-row.customer-new {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.1) 0%, rgba(255, 255, 255, 1) 10%);
    border-left: 4px solid #2196f3;
}

/* Mobile Customer Styles */
@media (max-width: 767px) {
    .customer-type {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-buttons .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}
/* ===== ENHANCED REPORTS FILTERS ===== */
.report-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

.custom-date-inputs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-actions .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Enhanced Report Cards */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.report-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.report-content {
    flex: 1;
}

.report-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

.report-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.25rem;
}

.report-period {
    color: #888;
    font-size: 0.8rem;
}

/* Mobile Responsive for Reports */
@media (max-width: 767px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
        width: 100%;
    }
    
    .custom-date-inputs {
        flex-direction: column;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .filter-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .report-card {
        padding: 1rem;
    }
    
    .report-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .report-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .report-filters {
        padding: 1rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .report-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0.8rem;
    }
    
    .report-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .report-value {
        font-size: 1.3rem;
    }
}

/* Extra Small Devices - Enhanced Mobile Experience */
@media (max-width: 480px) {
    /* Ultra Mobile Optimizations */
    body {
        font-size: 13px;
    }
    
    .header {
        padding: 0.6rem 0.8rem;
    }
    
    .header h1 {
        font-size: 1rem;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    /* Sidebar Ultra Mobile */
    .sidebar {
        width: 90%;
    }
    
    .sidebar-header {
        padding: 1rem 0.8rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.1rem;
    }
    
    .nav-item {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Content Ultra Mobile */
    .dashboard-grid {
        padding: 0.8rem 0.6rem !important;
        gap: 0.6rem !important;
    }
    
    .content-section {
        padding: 0.8rem 0.6rem !important;
    }
    
    /* Stats Cards Ultra Mobile */
    .stat-card {
        padding: 0.8rem !important;
    }
    
    .stat-card h3 {
        font-size: 1.2rem !important;
    }
    
    .stat-card p {
        font-size: 0.8rem !important;
    }
    
    .stat-card i {
        font-size: 1.3rem !important;
    }
    
    /* Tables Ultra Mobile */
    table {
        font-size: 0.7rem;
    }
    
    th, td {
        padding: 0.4rem 0.3rem !important;
    }
    
    th {
        font-size: 0.65rem !important;
    }
    
    /* Buttons Ultra Mobile */
    .btn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.7rem !important;
        min-height: 28px !important;
    }
    
    .btn i {
        font-size: 0.75rem !important;
    }
    
    /* Modals Ultra Mobile */
    .modal {
        padding: 0.3rem !important;
    }
    
    .modal-content {
        border-radius: 8px !important;
        max-height: 98vh !important;
    }
    
    .modal-header {
        padding: 0.8rem !important;
    }
    
    .modal-header h3 {
        font-size: 1rem !important;
    }
    
    .modal-body {
        padding: 0.8rem !important;
        max-height: 75vh !important;
    }
    
    .modal-footer {
        padding: 0.8rem !important;
    }
    
    /* Forms Ultra Mobile */
    .form-control {
        padding: 0.6rem !important;
        font-size: 16px !important;
    }
    
    .form-group label {
        font-size: 0.85rem !important;
    }
    
    /* Status Badges Ultra Mobile */
    .status-badge {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.65rem !important;
    }
    
    /* FAB Ultra Mobile */
    .fab {
        width: 48px !important;
        height: 48px !important;
        bottom: 1.5rem !important;
        left: 1.5rem !important;
        font-size: 1.3rem !important;
    }
    
    /* Toast Ultra Mobile */
    .toast {
        top: 0.5rem !important;
        right: 0.5rem !important;
        left: 0.5rem !important;
        padding: 0.8rem !important;
        font-size: 0.85rem !important;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 1rem;
    }
    
    .header h1 {
        font-size: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
    
    .modal-content {
        max-height: 85vh !important;
    }
    
    .modal-body {
        max-height: 60vh !important;
    }
    
    .stat-card {
        padding: 0.8rem !important;
    }
    
    .stat-card h3 {
        font-size: 1.2rem !important;
    }
    
    .stat-card p {
        font-size: 0.8rem !important;
    }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch-friendly button sizes */
    .btn {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 0.5rem 1rem !important;
    }
    
    .nav-item {
        min-height: 48px !important;
        padding: 0.8rem 1rem !important;
    }
    
    /* Touch-friendly form controls */
    .form-control {
        min-height: 44px !important;
        padding: 0.75rem !important;
    }
    
    /* Touch-friendly table interactions */
    td .btn {
        min-height: 36px !important;
        min-width: 36px !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .nav-item:hover,
    tr:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Add active states for touch feedback */
    .btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    .nav-item:active {
        background: rgba(255, 255, 255, 0.3) !important;
        transition: background 0.1s ease !important;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows for retina displays */
    .stat-card,
    .modal-content,
    .table-container {
        box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
    }
    
    .btn {
        border-width: 0.5px !important;
    }
    
    table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }
    
    th, td {
        border-width: 0.5px !important;
    }
}

/* Dark Mode Mobile Optimizations */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a !important;
        color: #e0e0e0 !important;
    }
    
    .header {
        background: #2d2d2d !important;
        border-bottom-color: #404040 !important;
    }
    
    .stat-card,
    .table-container,
    .modal-content,
    .reports-filters {
        background: #2d2d2d !important;
        border-color: #404040 !important;
        color: #e0e0e0 !important;
    }
    
    .form-control {
        background: #3a3a3a !important;
        border-color: #555 !important;
        color: #e0e0e0 !important;
    }
    
    .form-control:focus {
        border-color: #007bff !important;
        background: #404040 !important;
    }
    
    th {
        background: #3a3a3a !important;
        color: #e0e0e0 !important;
    }
    
    tr:hover {
        background: #3a3a3a !important;
    }
    
    .toast {
        background: #2d2d2d !important;
        color: #e0e0e0 !important;
        border: 1px solid #404040 !important;
    }
}
/* Mobile Table Stacking - Enhanced */
@media (max-width: 768px) {
    .table-stack {
        border: none !important;
    }
    
    .table-stack thead {
        display: none !important;
    }
    
    .table-stack tbody tr {
        display: block !important;
        background: white !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        border: 1px solid #e9ecef !important;
    }
    
    .table-stack tbody td {
        display: block !important;
        text-align: right !important;
        border: none !important;
        padding: 0.5rem 0 !important;
        position: relative !important;
        padding-right: 50% !important;
        border-bottom: 1px solid #f1f3f4 !important;
    }
    
    .table-stack tbody td:last-child {
        border-bottom: none !important;
    }
    
    .table-stack tbody td:before {
        content: attr(data-label) ": " !important;
        position: absolute !important;
        right: 0 !important;
        width: 45% !important;
        text-align: right !important;
        font-weight: 600 !important;
        color: #495057 !important;
        font-size: 0.8rem !important;
    }
    
    .table-stack tbody td .btn-group {
        justify-content: flex-start !important;
        margin-top: 0.5rem !important;
    }
    
    .table-stack tbody td .status-badge {
        display: inline-block !important;
        margin-top: 0.2rem !important;
    }
}

/* Enhanced Action Buttons for Mobile Tables */
@media (max-width: 768px) {
    .table-stack .action-buttons {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.3rem !important;
        justify-content: flex-start !important;
        margin-top: 0.5rem !important;
    }
    
    .table-stack .action-buttons .btn {
        flex: 1 !important;
        min-width: auto !important;
        max-width: calc(50% - 0.15rem) !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .table-stack .action-buttons .btn i {
        margin-left: 0.2rem !important;
    }
}

/* Mobile-First Loading States */
@media (max-width: 768px) {
    .mobile-loading {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 3rem 1rem !important;
        text-align: center !important;
    }
    
    .mobile-loading .spinner {
        width: 40px !important;
        height: 40px !important;
        border: 3px solid #f3f3f3 !important;
        border-top: 3px solid #007bff !important;
        border-radius: 50% !important;
        animation: spin 1s linear infinite !important;
        margin-bottom: 1rem !important;
    }
    
    .mobile-loading p {
        color: #6c757d !important;
        font-size: 0.9rem !important;
        margin: 0 !important;
    }
}

/* Mobile Pull-to-Refresh */
@media (max-width: 768px) {
    .pull-to-refresh {
        position: relative !important;
        overflow: hidden !important;
    }
    
    .pull-to-refresh::before {
        content: "↓ اسحب للتحديث" !important;
        position: absolute !important;
        top: -50px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: #007bff !important;
        color: white !important;
        padding: 0.5rem 1rem !important;
        border-radius: 20px !important;
        font-size: 0.8rem !important;
        transition: top 0.3s ease !important;
        z-index: 1000 !important;
    }
    
    .pull-to-refresh.pulling::before {
        top: 10px !important;
    }
}

/* Mobile Swipe Actions */
@media (max-width: 768px) {
    .swipe-actions {
        position: relative !important;
        overflow: hidden !important;
    }
    
    .swipe-actions .swipe-content {
        transition: transform 0.3s ease !important;
        background: white !important;
        position: relative !important;
        z-index: 2 !important;
    }
    
    .swipe-actions .swipe-buttons {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        z-index: 1 !important;
    }
    
    .swipe-actions .swipe-btn {
        height: 100% !important;
        padding: 0 1rem !important;
        border: none !important;
        color: white !important;
        font-size: 0.8rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 80px !important;
    }
    
    .swipe-actions .swipe-btn.edit {
        background: #28a745 !important;
    }
    
    .swipe-actions .swipe-btn.delete {
        background: #dc3545 !important;
    }
}

/* Mobile Sticky Headers */
@media (max-width: 768px) {
    .mobile-sticky-header {
        position: sticky !important;
        top: 0 !important;
        background: white !important;
        z-index: 100 !important;
        padding: 1rem !important;
        border-bottom: 1px solid #dee2e6 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    .mobile-sticky-header h2 {
        margin: 0 !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        color: #495057 !important;
    }
    
    .mobile-sticky-header .header-actions {
        margin-top: 0.5rem !important;
        display: flex !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        border-top: 1px solid #dee2e6 !important;
        padding: 0.5rem !important;
        display: flex !important;
        justify-content: space-around !important;
        z-index: 1000 !important;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .mobile-bottom-nav .nav-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0.5rem !important;
        border: none !important;
        background: none !important;
        color: #6c757d !important;
        font-size: 0.7rem !important;
        text-decoration: none !important;
        transition: color 0.2s ease !important;
        min-width: 60px !important;
    }
    
    .mobile-bottom-nav .nav-btn.active {
        color: #007bff !important;
    }
    
    .mobile-bottom-nav .nav-btn i {
        font-size: 1.2rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    /* Add padding to main content when bottom nav is present */
    .main-content.with-bottom-nav {
        padding-bottom: 80px !important;
    }
}

/* Mobile Search Enhancement */
@media (max-width: 768px) {
    .mobile-search {
        position: sticky !important;
        top: 0 !important;
        background: white !important;
        padding: 1rem !important;
        border-bottom: 1px solid #dee2e6 !important;
        z-index: 99 !important;
    }
    
    .mobile-search .search-input {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        border: 1px solid #ced4da !important;
        border-radius: 25px !important;
        font-size: 16px !important;
        background: #f8f9fa !important;
        transition: all 0.2s ease !important;
    }
    
    .mobile-search .search-input:focus {
        background: white !important;
        border-color: #007bff !important;
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25) !important;
        outline: none !important;
    }
    
    .mobile-search .search-results {
        position: absolute !important;
        top: 100% !important;
        left: 1rem !important;
        right: 1rem !important;
        background: white !important;
        border: 1px solid #dee2e6 !important;
        border-top: none !important;
        border-radius: 0 0 8px 8px !important;
        max-height: 300px !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    }
    
    .mobile-search .search-result-item {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #f1f3f4 !important;
        cursor: pointer !important;
        transition: background 0.2s ease !important;
    }
    
    .mobile-search .search-result-item:hover {
        background: #f8f9fa !important;
    }
    
    .mobile-search .search-result-item:last-child {
        border-bottom: none !important;
    }
}
/* Final Mobile Enhancements */
@media (max-width: 768px) {
    /* Improved Typography for Mobile */
    body {
        font-size: 14px;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }
    
    /* Enhanced Button Spacing */
    .btn + .btn {
        margin-right: 0.25rem;
    }
    
    /* Improved Form Layout */
    .form-row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row .form-group {
        margin-bottom: 0;
    }
    
    /* Better Modal Animations */
    .modal.fade .modal-dialog {
        transform: translate(0, -50px);
        transition: transform 0.3s ease-out;
    }
    
    .modal.show .modal-dialog {
        transform: translate(0, 0);
    }
    
    /* Enhanced Loading States */
    .btn.loading {
        position: relative;
        color: transparent !important;
    }
    
    .btn.loading::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    /* Improved Accessibility */
    .sr-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
    
    /* Focus Indicators */
    .btn:focus,
    .form-control:focus,
    .nav-item:focus {
        outline: 2px solid #007bff !important;
        outline-offset: 2px !important;
    }
    
    /* High Contrast Mode Support */
    @media (prefers-contrast: high) {
        .btn {
            border-width: 2px !important;
        }
        
        .stat-card,
        .modal-content,
        .table-container {
            border: 2px solid #000 !important;
        }
    }
    
    /* Reduced Motion Support */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
    
    /* Print Styles for Mobile */
    @media print {
        .sidebar,
        .header,
        .btn,
        .modal {
            display: none !important;
        }
        
        .main-content {
            margin: 0 !important;
            width: 100% !important;
        }
        
        .stat-card,
        .table-container {
            break-inside: avoid !important;
            box-shadow: none !important;
            border: 1px solid #000 !important;
        }
    }
}

/* Performance Optimizations */
.dashboard-container {
    contain: layout style paint;
}

.sidebar {
    contain: layout style;
}

.main-content {
    contain: layout;
}

.stat-card {
    contain: layout style paint;
}

/* GPU Acceleration for Smooth Animations */
.sidebar,
.modal-dialog,
.btn,
.nav-item {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize Scrolling Performance */
.table-container,
.modal-body {
    -webkit-overflow-scrolling: touch;
}

/* Prevent Layout Shifts */
.stat-card h3 {
    min-height: 2rem;
}

.btn {
    min-width: 44px;
    min-height: 44px;
}

/* Enhanced Error States */
.error-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #dc3545;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-state h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #721c24;
}

.error-state p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: #856404;
}

.error-state .btn {
    margin: 0.25rem;
}

/* Success States */
.success-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #28a745;
}

.success-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.success-state h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #155724;
}

.success-state p {
    font-size: 0.9rem;
    color: #6c757d;
}
/* Toast Notifications - Enhanced */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    z-index: 10000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    border-left: 4px solid #007bff;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-content i {
    font-size: 1.2rem;
}

.toast.success .toast-content i {
    color: #28a745;
}

.toast.error .toast-content i {
    color: #dc3545;
}

.toast.warning .toast-content i {
    color: #ffc107;
}

.toast.info .toast-content i {
    color: #17a2b8;
}

/* Pull to Refresh Styles */
.pull-to-refresh {
    position: relative;
    overflow: hidden;
}

.pull-to-refresh::before {
    content: "↓ اسحب للتحديث";
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: top 0.3s ease;
    z-index: 1000;
    white-space: nowrap;
}

.pull-to-refresh.pulling::before {
    top: 10px;
}

.pull-to-refresh.pull-ready::before {
    content: "↑ اتركه للتحديث";
    background: #28a745;
}

/* Animation Classes */
.animate {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Swipe Actions for Table Rows */
.table-row-swipe {
    position: relative;
    overflow: hidden;
}

.table-row-swipe .swipe-actions {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem;
    transition: left 0.3s ease;
}

.table-row-swipe.swiped .swipe-actions {
    left: 0;
}

.table-row-swipe .swipe-actions .btn {
    margin-left: 0.5rem;
}

/* Enhanced Mobile Buttons */
@media (max-width: 768px) {
    .btn-mobile-stack {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .btn-mobile-stack .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .btn-mobile-inline {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
        justify-content: center !important;
    }
    
    .btn-mobile-inline .btn {
        flex: 1 !important;
        min-width: calc(50% - 0.125rem) !important;
        max-width: calc(50% - 0.125rem) !important;
    }
}

/* Mobile-First Grid System */
@media (max-width: 768px) {
    .mobile-grid-1 { grid-template-columns: 1fr !important; }
    .mobile-grid-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .mobile-grid-3 { grid-template-columns: repeat(3, 1fr) !important; }
    
    .mobile-col-full { grid-column: 1 / -1 !important; }
    .mobile-col-half { grid-column: span 1 !important; }
    
    .mobile-order-1 { order: 1 !important; }
    .mobile-order-2 { order: 2 !important; }
    .mobile-order-3 { order: 3 !important; }
    .mobile-order-last { order: 999 !important; }
}

/* Enhanced Accessibility */
@media (max-width: 768px) {
    /* Focus Management */
    .focus-trap {
        position: relative;
    }
    
    .focus-trap::before,
    .focus-trap::after {
        content: "";
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }
    
    /* Skip Links */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 6px;
        background: #000;
        color: #fff;
        padding: 8px;
        text-decoration: none;
        border-radius: 4px;
        z-index: 10001;
        transition: top 0.3s ease;
    }
    
    .skip-link:focus {
        top: 6px;
    }
    
    /* Screen Reader Only */
    .sr-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
    
    .sr-only-focusable:focus {
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding: inherit !important;
        margin: inherit !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.will-change-transform {
    will-change: transform;
}

.will-change-scroll {
    will-change: scroll-position;
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .toast {
        transition: none !important;
    }
    
    .pull-to-refresh::before {
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn,
    .form-control,
    .stat-card,
    .modal-content {
        border: 2px solid !important;
    }
    
    .btn-primary {
        background: #0000ff !important;
        border-color: #0000ff !important;
        color: #ffffff !important;
    }
    
    .btn-success {
        background: #008000 !important;
        border-color: #008000 !important;
        color: #ffffff !important;
    }
    
    .btn-danger {
        background: #ff0000 !important;
        border-color: #ff0000 !important;
        color: #ffffff !important;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d2d2d !important;
        color: #e0e0e0 !important;
        border: 1px solid #404040 !important;
    }
    
    .pull-to-refresh::before {
        background: #0d6efd !important;
        color: #ffffff !important;
    }
    
    .pull-to-refresh.pull-ready::before {
        background: #198754 !important;
    }
}
/* Reports Section Styles */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.report-card .report-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.report-card .report-icon i.fa-money-bill-wave {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.report-card .report-icon i.fa-truck {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

.report-card .report-icon i.fa-check-circle {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.report-card .report-icon i.fa-shopping-cart {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.report-card .report-icon i.fa-calculator {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.report-card .report-icon i.fa-users {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

.report-content h3 {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.report-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.25rem;
}

.report-period {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Report Sections */
.report-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.report-section h3 {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-section h3 i {
    color: #007bff;
}

.report-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Top Items Styles */
.top-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
}

.top-item:hover {
    background: #f8f9fa;
}

.top-item:last-child {
    border-bottom: none;
}

.item-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Reports Layout with Dashboard Colors */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.report-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.report-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.report-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.report-period {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Reports Container */
.reports-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.report-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.report-section:hover {
    transform: translateY(-3px);
}

.report-section h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.report-section h3 i {
    margin-left: 0.5rem;
}

.report-container {
    padding: 1.5rem;
    min-height: 300px;
}

/* VIP Customers Table */
.vip-customers-report {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.customers-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
}

.customers-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.customers-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.customers-table tr:hover {
    background-color: #f8f9fa;
}

.customers-table tr:last-child td {
    border-bottom: none;
}

.phone-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.phone-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.phone-link i {
    margin-left: 0.25rem;
}

.orders-count {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

.total-spent {
    color: #28a745;
    font-weight: 600;
    font-size: 1rem;
}

.customer-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.vip-badge {
    background: #ffc107;
    color: #212529;
}

.premium-badge {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

/* Simple Reports */
.simple-report {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
    transition: transform 0.3s ease;
}

.simple-report:hover {
    transform: translateX(5px);
}

.simple-report p {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.simple-report ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.simple-report li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.simple-report li:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.simple-report li:last-child {
    margin-bottom: 0;
}

/* Filter Styles */
.report-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
}

.filter-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
    margin-left: 0.5rem;
}

.filter-actions .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.filter-actions .btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.filter-actions .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.filter-actions .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.filter-actions .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.filter-actions .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.filter-actions .btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.filter-actions .btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .reports-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .report-card {
        padding: 1.5rem;
    }
    
    .report-value {
        font-size: 2rem;
    }
    
    .report-container {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .customers-table th,
    .customers-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .simple-report {
        padding: 1.5rem;
    }
    
    .simple-report li {
        padding: 0.75rem 1rem;
    }
}

/* Filter Styles Enhancement */
.report-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-date-inputs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.filter-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.filter-actions .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.filter-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.filter-actions .btn-warning {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.filter-actions .btn-success {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.filter-actions .btn-info {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

/* VIP Customers Report Styles */
.vip-customers-report {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vip-customers-report h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.customers-table-container {
    overflow-x: auto;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.customers-table th,
.customers-table td {
    padding: 0.5rem;
    text-align: right;
    border-bottom: 1px solid #dee2e6;
}

.customers-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.customers-table tr:hover {
    background: #f8f9fa;
}

.phone-link {
    color: #007bff;
    text-decoration: none;
}

.phone-link:hover {
    text-decoration: underline;
}

.orders-count {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.total-spent {
    color: #28a745;
}

.customer-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.vip-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #856404;
}

.premium-badge {
    background: linear-gradient(135deg, #c0c0c0, #e2e2e2);
    color: #495057;
}

/* Simple Reports Enhanced */
.simple-report {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease;
}

.simple-report:hover {
    transform: translateX(5px);
}

.simple-report p {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.simple-report ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.simple-report li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.simple-report li:hover {
    background: #f8f9fa;
    transform: translateX(3px);
}

.simple-report li:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .reports-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .custom-date-inputs {
        flex-direction: column;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .item-stats,
    .customer-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-state small {
    font-size: 0.9rem;
    color: #adb5bd;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.success-message i {
    margin-left: 0.5rem;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.item-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.item-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* VIP Customers Styles */
.vip-customer {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
}

.vip-customer:hover {
    background: #f8f9fa;
}

.vip-customer:last-child {
    border-bottom: none;
}

.customer-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-left: 1rem;
    flex-shrink: 0;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.customer-badge.vip {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.customer-badge.premium {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
}

.customer-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.customer-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Daily Performance Chart */
.chart-header {
    margin-bottom: 1rem;
}

.chart-header h4 {
    font-size: 1.1rem;
    color: #495057;
    margin: 0;
}

.chart-bars {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    height: 200px;
    padding: 1rem 0;
    overflow-x: auto;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    height: 100%;
}

.bar {
    width: 30px;
    background: linear-gradient(135deg, #007bff, #6610f2);
    border-radius: 4px 4px 0 0;
    min-height: 5px;
    transition: all 0.3s ease;
}

.bar:hover {
    background: linear-gradient(135deg, #0056b3, #520dc2);
    transform: scaleY(1.05);
}

.bar-label {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
}

.bar-label .date {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.2rem;
}

.bar-label .value {
    color: #007bff;
    font-weight: 600;
}

.bar-label .orders {
    color: #6c757d;
    font-size: 0.7rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* Report Filters */
.report-filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.custom-date-inputs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile Responsive for Reports */
@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .report-card {
        padding: 1rem;
    }
    
    .report-value {
        font-size: 1.5rem;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .custom-date-inputs {
        flex-direction: column;
    }
    
    .filter-actions {
        justify-content: stretch;
    }
    
    .filter-actions .btn {
        flex: 1;
    }
    
    .item-stats,
    .customer-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .chart-bars {
        height: 150px;
    }
    
    .bar-label {
        font-size: 0.7rem;
    }
}
/* Modal Display Rules - Fixed and Simplified */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

/* إزالة أي backdrop تلقائي */
.modal-backdrop {
    display: none !important;
}

.modal-backdrop.show {
    display: block !important;
}

/* منع body من الحصول على modal-open تلقائياً */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* تحسين أداء النوافذ */
.modal-dialog {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* تحسينات إضافية للتقارير */
.report-value {
    animation: countUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.report-value:hover {
    transform: scale(1.05);
    color: #007bff !important;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-item {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.vip-customer {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chart-bar {
    animation: growUp 0.8s ease-out;
}

@keyframes growUp {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

/* تحسين الألوان */
.report-card:nth-child(1) .report-icon {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.report-card:nth-child(2) .report-icon {
    background: linear-gradient(135deg, #007bff, #6610f2) !important;
}

.report-card:nth-child(3) .report-icon {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
}

.report-card:nth-child(4) .report-icon {
    background: linear-gradient(135deg, #17a2b8, #6f42c1) !important;
}

.report-card:nth-child(5) .report-icon {
    background: linear-gradient(135deg, #6f42c1, #e83e8c) !important;
}

.report-card:nth-child(6) .report-icon {
    background: linear-gradient(135deg, #dc3545, #fd7e14) !important;
}

/* تأثيرات التحميل */
.loading-reports {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #6c757d;
}

.loading-reports i {
    margin-left: 0.5rem;
    animation: spin 1s linear infinite;
}

/* رسالة النجاح */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
    text-align: center;
    font-weight: 600;
}

.success-message i {
    margin-left: 0.5rem;
    color: #28a745;
}

/* ===== MANAGEMENT CARDS STYLES ===== */
.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.management-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.management-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.management-card:hover::before {
    width: 8px;
}

.management-card:active {
    transform: translateY(-2px);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.card-content {
    flex: 1;
}

.card-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.card-content p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-count {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.card-arrow {
    color: #667eea;
    font-size: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.management-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(-5px);
}

/* Quick Actions Title */
.quick-actions h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.quick-actions h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Responsive Design for Management Cards */
@media (max-width: 768px) {
    .management-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .management-card {
        padding: 20px;
        gap: 15px;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .card-content h4 {
        font-size: 1.1rem;
    }
    
    .card-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .management-card {
        padding: 15px;
        gap: 12px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .card-content h4 {
        font-size: 1rem;
    }
    
    .card-content p {
        font-size: 0.85rem;
    }
    
    .card-count {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
}

/* Animation for card loading */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.management-card {
    animation: cardSlideIn 0.6s ease forwards;
}

.management-card:nth-child(1) { animation-delay: 0.1s; }
.management-card:nth-child(2) { animation-delay: 0.2s; }
.management-card:nth-child(3) { animation-delay: 0.3s; }
.management-card:nth-child(4) { animation-delay: 0.4s; }
.management-card:nth-child(5) { animation-delay: 0.5s; }
.management-card:nth-child(6) { animation-delay: 0.6s; }
.management-card:nth-child(7) { animation-delay: 0.7s; }
.management-card:nth-child(8) { animation-delay: 0.8s; }
/* ===== ORDER DETAILS MODAL STYLES ===== */
.order-details-container {
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

.details-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.details-section h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-section h4 i {
    color: #667eea;
    font-size: 1.1rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.detail-item span {
    color: #2c3e50;
    font-size: 1rem;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Products Table in Modal */
.products-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.products-details-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.products-details-table th,
.products-details-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.products-details-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.products-details-table tbody tr:hover {
    background: #f8f9fa;
}

/* Invoice Summary */
.invoice-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    border-top: 2px solid #28a745;
    margin-top: 10px;
    padding-top: 15px;
}

/* Status Management */
.status-management {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.current-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.current-status label {
    font-weight: 600;
    color: #495057;
}

.current-status .status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.status-action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    min-width: 120px;
    justify-content: center;
}

.status-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.status-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-action-btn.new {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.status-action-btn.confirmed {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.status-action-btn.preparing {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.status-action-btn.delivered {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.status-action-btn.cancelled {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* Status Classes */
.status.new { background: #6c757d; color: white; }
.status.confirmed { background: #007bff; color: white; }
.status.preparing { background: #ffc107; color: #212529; }
.status.delivered { background: #28a745; color: white; }
.status.cancelled { background: #dc3545; color: white; }

/* Enhanced Action Buttons in Orders Table */
.order-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.order-action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 70px;
    justify-content: center;
}

.order-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.order-action-btn.view {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.order-action-btn.call {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.order-action-btn.next-status {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

/* Responsive Design for Order Details */
@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .status-actions {
        flex-direction: column;
    }
    
    .status-action-btn {
        min-width: 100%;
    }
    
    .order-actions {
        flex-direction: column;
        gap: 3px;
    }
    
    .order-action-btn {
        min-width: 100%;
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .details-section {
        padding: 15px;
    }
    
    .products-details-table th,
    .products-details-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
    }
    
    .summary-row.total {
        font-size: 1.1rem;
    }
}
/* ===== ORDER STATUS BUTTONS ===== */
.status-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.status-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.status-btn-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.status-count {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.status-btn-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== CUSTOMER FILTERS ===== */
.customer-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.customer-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.customer-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.customer-filter-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.customer-filter-btn .count {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.customer-filter-btn.active .count {
    background: rgba(255,255,255,0.3);
}

/* ===== ORDER MODAL ENHANCEMENTS ===== */
.order-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.customer-info-card,
.order-products-card,
.order-summary-card,
.order-status-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.customer-info-card h4,
.order-products-card h4,
.order-summary-card h4,
.order-status-card h4 {
    color: #667eea;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.info-item span {
    font-weight: 500;
    color: #333;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.product-quantity {
    color: #666;
    font-size: 0.9rem;
}

.product-price {
    font-weight: bold;
    color: #667eea;
}

.summary-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.summary-item.total {
    border-top: 2px solid #667eea;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.price {
    font-weight: bold;
    color: #28a745;
}

.status-controls {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    min-width: 200px;
}

/* ===== ORDER ACTIONS ===== */
.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.order-action-btn.view {
    background: #667eea;
    color: white;
}

.order-action-btn.view:hover {
    background: #5a6fd8;
}

.order-action-btn.call {
    background: #28a745;
    color: white;
}

.order-action-btn.call:hover {
    background: #218838;
}

.order-action-btn.next-status {
    background: #ffc107;
    color: #212529;
}

.order-action-btn.next-status:hover {
    background: #e0a800;
}

.order-action-btn.cancel {
    background: #dc3545;
    color: white;
}

.order-action-btn.cancel:hover {
    background: #c82333;
}

/* ===== CUSTOMER TYPE BADGES ===== */
.customer-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.customer-type-badge.new {
    background: #e3f2fd;
    color: #1976d2;
}

.customer-type-badge.premium {
    background: #fff3e0;
    color: #f57c00;
}

.customer-type-badge.vip {
    background: #fce4ec;
    color: #c2185b;
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
    .status-buttons,
    .customer-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-btn,
    .customer-filter-btn {
        min-width: auto;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-action-btn {
        justify-content: center;
    }
    
    .status-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-select {
        min-width: auto;
    }
}

/* ===== LOADING STATES ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}
/* ===== CUSTOMER ORDERS MODAL ===== */
.customer-order-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
}

.order-status {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 0.25rem;
}

.order-total {
    color: #28a745;
    font-size: 1.1rem;
}

/* ===== STATUS CLASSES ===== */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.new {
    background: #ffebee;
    color: #c62828;
}

.status.confirmed {
    background: #e3f2fd;
    color: #1565c0;
}

.status.preparing {
    background: #fff8e1;
    color: #ef6c00;
}

.status.delivered {
    background: #e8f5e8;
    color: #2e7d32;
}

.status.cancelled {
    background: #fafafa;
    color: #424242;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-success i {
    color: #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-error i {
    color: #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-info i {
    color: #17a2b8;
}

/* ===== ENHANCED TABLE STYLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: right;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    position: relative;
    margin-bottom: 2rem;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
}

.search-container i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    color: #333;
    font-weight: 600;
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
    .order-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .order-status {
        align-items: start;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar,
    .header,
    .modal-footer,
    .order-actions,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .content-wrapper {
        margin-top: 0;
    }
}

/* ===== ENHANCED MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: end;
}

/* ===== BUTTON ENHANCEMENTS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== FORM ENHANCEMENTS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control,
.status-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus,
.status-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== TABLE CONTAINER ===== */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

/* ===== CONTENT AREA ===== */
.content-area {
    padding: 2rem;
}

.section {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.section.active {
    display: block;
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
    color: #667eea !important;
}

.text-muted {
    color: #6c757d !important;
}

.d-none {
    display: none !important;
}

.d-inline {
    display: inline !important;
}

.d-md-inline {
    display: none !important;
}

@media (min-width: 768px) {
    .d-md-inline {
        display: inline !important;
    }
}
/* ===== CUSTOMER SUMMARY ===== */
.customer-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.col-md-3 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-item strong {
    display: block;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-item span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

@media (max-width: 768px) {
    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .row {
        flex-direction: column;
    }
}
/* ===== REPORTS STYLES ===== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease;
}

.report-card:hover {
    transform: translateY(-2px);
}

.report-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.report-content h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.report-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.report-period {
    color: #666;
    font-size: 0.85rem;
}

.reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.report-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.report-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-container {
    max-height: 400px;
    overflow-y: auto;
}

.report-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.report-item:hover {
    background: #f8f9fa;
}

.report-item:last-child {
    border-bottom: none;
}

.report-rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-left: 1rem;
    flex-shrink: 0;
}

.vip-customer .report-rank {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
}

.report-details {
    flex: 1;
}

.report-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.report-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== DAILY PERFORMANCE CHART ===== */
.daily-performance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.daily-performance-item:last-child {
    border-bottom: none;
}

.performance-bar {
    width: 30px;
    height: 100px;
    background: #f0f0f0;
    border-radius: 15px;
    position: relative;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: height 0.5s ease;
}

.performance-stats {
    text-align: center;
}

.performance-date {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.performance-orders {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.performance-revenue {
    font-size: 0.9rem;
    font-weight: 600;
    color: #28a745;
}

/* ===== REPORT FILTERS ===== */
.report-filters {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
}

.custom-date-inputs {
    display: none;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message i {
    color: #28a745;
}

/* ===== RESPONSIVE REPORTS ===== */
@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-container {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .custom-date-inputs {
        flex-direction: column;
    }
    
    .filter-actions {
        justify-content: stretch;
    }
    
    .filter-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .report-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .daily-performance-item {
        padding: 0.75rem 0.25rem;
    }
    
    .performance-bar {
        width: 25px;
        height: 80px;
    }
}

/* ===== PRINT STYLES FOR REPORTS ===== */
@media print {
    .report-filters,
    .filter-actions,
    .report-actions {
        display: none !important;
    }
    
    .reports-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .reports-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .report-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* ===== إخفاء شاشة التحميل نهائياً ===== */
.loading-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== ضمان ظهور المحتوى ===== */
.dashboard-container {
    opacity: 1 !important;
    visibility: visible !important;
}

.main-content {
    opacity: 1 !important;
    visibility: visible !important;
}

.sidebar {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== إصلاح أي مشاكل في العرض ===== */
body {
    overflow: auto !important;
}

.section {
    opacity: 1 !important;
    visibility: visible !important;
}

.section.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}
/* ===== FORCE MODAL TO SHOW - إجبار ظهور Modal ===== */
.modal.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal.show .modal-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    max-width: 90% !important;
    max-height: 90% !important;
    overflow-y: auto !important;
}

/* Override any hiding rules */
body .modal.show {
    display: flex !important;
}

body:not(.loaded) .modal.show {
    display: flex !important;
    visibility: visible !important;
}

/* Ensure modal content is visible */
.modal.show .order-modal-content,
.modal.show .modal-body,
.modal.show .modal-header,
.modal.show .modal-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* Quick Overview Styles */
.quick-overview {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.quick-overview h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.mini-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.mini-header i {
    color: #667eea;
    margin-left: 0.5rem;
}

.mini-header span {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.mini-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
}

.mini-btn:hover {
    background: #5a6fd8;
}

.mini-content {
    max-height: 200px;
    overflow-y: auto;
}

.mini-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.mini-item:last-child {
    margin-bottom: 0;
}

.mini-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.75rem;
    font-size: 0.8rem;
}

.mini-item-content {
    flex: 1;
}

.mini-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.mini-item-subtitle {
    color: #666;
    font-size: 0.8rem;
}

.mini-item-value {
    font-weight: 600;
    color: #667eea;
}

/* Notification Button Styles */
.notification-btn {
    position: relative;
    border: 2px solid #667eea !important;
    color: #667eea !important;
    background: white !important;
}

.notification-btn:hover {
    background: #667eea !important;
    color: white !important;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 20px;
}

.notification-badge.hidden {
    display: none;
}

/* Status Colors for Mini Items */
.status-new { background: #dc3545; color: white; }
.status-confirmed { background: #007bff; color: white; }
.status-preparing { background: #ffc107; color: #333; }
.status-ready { background: #17a2b8; color: white; }
.status-delivered { background: #28a745; color: white; }
.status-cancelled { background: #6c757d; color: white; }

/* Responsive Design */
@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .mini-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mini-btn {
        align-self: flex-end;
    }
}
/* Print Options Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 6px;
    border: 1px solid #ddd;
    bottom: 100%;
    right: 0;
    margin-bottom: 5px;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    border-radius: 4px;
    margin: 2px;
}

.dropdown-item:hover {
    background-color: #667eea;
    color: white;
    transform: translateX(-2px);
}

.dropdown-item i {
    margin-left: 8px;
    width: 16px;
    color: #667eea;
    transition: color 0.3s;
}

.dropdown-item:hover i {
    color: white;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    overflow: hidden;
    background-color: #e9ecef;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-toggle .fa-chevron-up,
.dropdown-toggle .fa-chevron-down {
    transition: transform 0.3s;
}

/* Print Size Modal Enhancements */
.print-modal {
    font-family: 'Cairo', sans-serif;
}

.print-modal button {
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}

.print-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.print-modal .fas {
    color: inherit;
}

/* Receipt Preview Styles */
.receipt-preview {
    background: #f8f9fa;
    border: 2px dashed #ccc;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.3;
    direction: rtl;
    text-align: right;
}

.receipt-preview.size-58mm {
    max-width: 200px;
    font-size: 0.7rem;
}

.receipt-preview.size-80mm {
    max-width: 280px;
    font-size: 0.8rem;
}