/* ============================================================
   نظام توصيل اذنا - التصميم المحسّن
   Smooth & Dynamic UI (بدون GPS/خرائط)
   ============================================================ */

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #ff9f1c;
    --success: #00b894;
    --danger: #ff4757;
    --info: #0984e3;
    --warning: #ffd700;
    --dark: #2d3436;
    --gray: #636e72;
    --light-gray: #dfe6e9;
    --bg: #f5f7fa;
    --card-bg: #ffffff;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.16);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition: all 0.35s var(--ease-smooth);
}

/* ============================================================
   الأساسيات
   ============================================================ */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--dark);
    margin: 0;
    padding: 0;
    direction: rtl;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.page {
    display: none;
    min-height: 100vh;
    animation: pageFadeIn 0.5s var(--ease-smooth);
}

.page.active { display: block; }

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

/* ============================================================
   الأزرار
   ============================================================ */
button, .btn {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

button:active, .btn:active { transform: scale(0.96); }

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--ease-smooth), height 0.6s var(--ease-smooth);
    pointer-events: none;
}

button:active::before, .btn:active::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #00cec9);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 184, 148, 0.35);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(0, 184, 148, 0.5); transform: translateY(-2px); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ff6b81);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 71, 87, 0.35);
}
.btn-danger:hover { box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5); transform: translateY(-2px); }

.btn-info {
    background: linear-gradient(135deg, var(--info), #74b9ff);
    color: #fff;
    box-shadow: 0 4px 14px rgba(9, 132, 227, 0.35);
}
.btn-info:hover { box-shadow: 0 6px 20px rgba(9, 132, 227, 0.5); transform: translateY(-2px); }

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-warning:hover { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5); transform: translateY(-2px); }

.btn-outline {
    background: #fff;
    color: var(--dark);
    border: 2px solid var(--light-gray);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-light {
    background: #fff;
    color: var(--dark);
}
.btn-light:hover { background: #f8f9fa; }

.btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

/* ============================================================
   الهيدر
   ============================================================ */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 24px !important;
    margin: 12px 5% !important;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.6s var(--ease-smooth);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-bar .logo { display: flex; align-items: center; gap: 12px; }
.header-bar .logo h1 { margin: 0; font-size: 1.4rem; }
.header-bar .user-badge { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============================================================
   قسم المطاعم / الطلبات
   ============================================================ */
.orders-section {
    padding: 24px !important;
    margin: 16px 5% !important;
    border-radius: var(--radius-lg) !important;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md) !important;
    animation: fadeIn 0.8s var(--ease-smooth);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.orders-section h2 {
    padding: 10px 24px !important;
    border-radius: 40px !important;
    font-size: 1.3rem !important;
    margin-bottom: 20px !important;
    box-shadow: var(--shadow-sm) !important;
    animation: slideDown 0.6s var(--ease-smooth);
}

.orders-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 20px !important;
}

/* ============================================================
   بطاقة الطلب
   ============================================================ */
.order-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: cardEnter 0.5s var(--ease-smooth) both;
    border-right: 4px solid var(--primary);
}

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

.order-card:nth-child(1) { animation-delay: 0.05s; }
.order-card:nth-child(2) { animation-delay: 0.1s; }
.order-card:nth-child(3) { animation-delay: 0.15s; }
.order-card:nth-child(4) { animation-delay: 0.2s; }
.order-card:nth-child(5) { animation-delay: 0.25s; }
.order-card:nth-child(6) { animation-delay: 0.3s; }

.order-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.order-card h3 {
    margin: 8px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    transition: color 0.3s var(--ease-smooth);
}

.order-card:hover h3 { color: var(--primary); }

/* ============================================================
   المودالات
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    animation: modalFadeIn 0.3s var(--ease-smooth);
}

.modal[style*="display:block"],
.modal[style*="display: block"] {
    display: flex !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(8px); }
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.4s var(--ease-bounce);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* تحافظ على الزوايا الدائرية أثناء تمرير المحتوى الداخلي */
}

.modal-scroll {
    overflow-y: auto;
    padding: 24px;
    flex: 1;
    min-height: 0;
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f7fa;
    color: var(--gray);
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

/* ============================================================
   حقول الإدخال
   ============================================================ */
input, textarea, select {
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
}

.login-form input,
.login-form textarea,
.login-form select {
    width: 100%;
    padding: 14px 16px !important;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 15px;
    background: #fafbfc;
}

.login-form input:focus {
    background: #fff;
    transform: translateY(-2px);
}

.login-form button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* ============================================================
   خطوات التتبع
   ============================================================ */
.tracking-steps {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 12px;
    position: relative;
}

.tracking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    opacity: 0.35;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tracking-step .step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eef0f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 3px solid transparent;
}

.tracking-step.completed { opacity: 1; }

.tracking-step.completed .step-icon {
    background: linear-gradient(135deg, #00b894, #55efc4);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 184, 148, 0.35);
}

.tracking-step.active { opacity: 1; }

.tracking-step.active .step-icon {
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
    animation: pulseStep 1.5s ease-in-out infinite;
    border-color: #ffecd2;
}

.tracking-step.cancelled .step-icon {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    opacity: 0.7;
}

.tracking-step span {
    font-size: 12px;
    font-weight: 700;
    color: #636e72;
    text-align: center;
    transition: color 0.3s ease;
}

.tracking-step.completed span,
.tracking-step.active span {
    color: #2d3436;
}

@keyframes pulseStep {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 28px rgba(255, 107, 53, 0.7);
    }
}

/* ============================================================
   إشعارات
   ============================================================ */
.notification {
    animation: notifSlide 0.4s var(--ease-bounce);
}

.notification-toast {
    pointer-events: auto;
    user-select: none;
}

.notification-toast .toast-close {
    transition: all 0.2s ease;
}

.notification-toast .toast-close:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

@keyframes notifSlide {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   المؤشرات
   ============================================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   بطاقات الإحصائيات (stats-container)
   ============================================================ */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #eef0f3;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fb, #eef0f3);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s var(--ease-smooth);
    border: 1px solid #eef0f3;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.stat-card .icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-card .label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
}

/* ============================================================
   ✅ بطاقات الإحصائيات الزمنية المميزة
   ============================================================ */
.stat-card-highlight {
    background: linear-gradient(135deg, #ff6b35, #ff9f1c) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.stat-card-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card-highlight:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 10px 28px rgba(255, 107, 53, 0.5) !important;
}

.stat-card-highlight .icon {
    font-size: 28px !important;
    filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 1;
}

.stat-card-highlight .value {
    color: #fff !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    line-height: 1.1;
}

.stat-card-highlight .label {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

/* ============================================================
   التجاوب
   ============================================================ */
@media (max-width: 768px) {
    .header-bar {
        padding: 12px 16px !important;
        margin: 8px 3% !important;
    }

    .header-bar .logo h1 { font-size: 1.1rem; }
    .header-bar .user-badge { width: 100%; justify-content: space-between; }
    .header-bar .user-badge button { font-size: 13px; padding: 8px 12px; }

    .orders-section {
        padding: 16px !important;
        margin: 12px 3% !important;
    }

    .orders-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 12px !important;
    }

    .order-card { padding: 12px; }
    .order-card h3 { font-size: 1rem; }
    .order-card .btn { padding: 8px 12px; font-size: 13px; }

    .modal-content {
        padding: 20px 16px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .tracking-step .step-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .tracking-step span { font-size: 10px; }

    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-card .value {
        font-size: 20px;
    }

    .stat-card .label {
        font-size: 11px;
    }

    .stat-card-highlight .value {
        font-size: 24px !important;
    }

    .stat-card-highlight .icon {
        font-size: 22px !important;
    }

    .stat-card-highlight .label {
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .orders-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .order-card { padding: 10px; }
    .order-card h3 { font-size: 0.9rem; }

    .notification-toast {
        font-size: 14px !important;
        padding: 12px 16px !important;
        min-width: auto !important;
        max-width: 95vw !important;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card-highlight {
        grid-column: span 1;
    }
}

/* ============================================================
   إخفاء شريط التمرير
   ============================================================ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================================
   زر الأدمن الصغير
   ============================================================ */
.admin-mini-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d3436, #636e72);
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 0;
    transition: var(--transition);
}

.admin-mini-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-xl);
}

/* ============================================================
   تحسينات إضافية
   ============================================================ */
::selection {
    background: var(--primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   ✅ أزرار الفلاتر الزمنية للتحليلات
   ============================================================ */
.analytics-range-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: 2px solid #eef0f3;
    background: #fff;
    color: #2d3436;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analytics-range-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.analytics-range-btn.active {
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

.analytics-range-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* ============================================================
   ✅ إضافات (KPI cards للتحليلات)
   ============================================================ */
.kpi-card {
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: #fff;
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
}

.kpi-card .kpi-icon {
    font-size: 28px;
}

.kpi-card .kpi-value {
    font-size: 28px;
    font-weight: 800;
    margin: 8px 0;
}

.kpi-card .kpi-label {
    font-size: 13px;
    opacity: 0.9;
}

.kpi-orange { background: linear-gradient(135deg, #ff6b35, #ff9f1c); }
.kpi-green { background: linear-gradient(135deg, #00b894, #55efc4); }
.kpi-blue { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.kpi-purple { background: linear-gradient(135deg, #9c27b0, #e91e63); }

/* ============================================================
   ✅ جداول الأدمن
   ============================================================ */
.admin-users-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    font-size: 14px !important;
}

.admin-users-table thead {
    background: linear-gradient(135deg, #2c2c54, #40407a) !important;
}

.admin-users-table thead th {
    padding: 14px 12px !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-align: right !important;
    font-size: 13px !important;
}

.admin-users-table tbody tr {
    border-bottom: 1px solid #f0f2f5 !important;
    transition: all 0.2s ease !important;
}

.admin-users-table tbody tr:hover { background: #fafbfc !important; }
.admin-users-table tbody tr:nth-child(even) { background: #fafbfc !important; }
.admin-users-table tbody tr:nth-child(even):hover { background: #f5f7fa !important; }
.admin-users-table tbody td {
    padding: 12px !important;
    color: #2d3436 !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f0f2f5 !important;
}
.admin-users-table tbody tr:last-child td { border-bottom: none !important; }

/* ============================================================
   ✅ شارات الحالة
   ============================================================ */
.status-badge {
    display: inline-block !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: capitalize !important;
}
.status-badge.status-pending { background: rgba(245, 158, 11, 0.15) !important; color: #f59e0b !important; }
.status-badge.status-preparing { background: rgba(9, 132, 227, 0.15) !important; color: #0984e3 !important; }
.status-badge.status-ready_for_pickup { background: rgba(0, 184, 148, 0.15) !important; color: #00b894 !important; }
.status-badge.status-picking { background: rgba(255, 159, 28, 0.15) !important; color: #ff9f1c !important; }
.status-badge.status-delivering { background: rgba(156, 39, 176, 0.15) !important; color: #9c27b0 !important; }
.status-badge.status-completed { background: rgba(0, 184, 148, 0.15) !important; color: #00b894 !important; }
.status-badge.status-cancelled { background: rgba(255, 71, 87, 0.15) !important; color: #ff4757 !important; }

/* ============================================================
   ✅ Admin loading & empty
   ============================================================ */
.admin-loading {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 40px !important;
    color: #636e72 !important;
    font-size: 14px !important;
}

.admin-empty {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #9ca3af !important;
    font-size: 15px !important;
}

.admin-empty::before {
    content: '📭' !important;
    display: block !important;
    font-size: 48px !important;
    margin-bottom: 10px !important;
    opacity: 0.5 !important;
}

/* ============================================================
   ✅ زر عرض المسار في جدول الطلبات (محذوف)
   ============================================================ */
/* ❌ تم حذف أنماط الخرائط والمسارات */

/* ============================================================
   ✅ أنماط الأزرار في الجداول
   ============================================================ */
.admin-users-table .btn-info {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: #fff;
    border: none;
}

.admin-users-table .btn-info:hover {
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.4);
}

/* ============================================================
   ✅ Responsive إضافي للجداول
   ============================================================ */
@media (max-width: 768px) {
    .admin-users-table {
        font-size: 12px !important;
    }
    .admin-users-table thead th,
    .admin-users-table tbody td {
        padding: 8px 6px !important;
    }
    
    .analytics-range-btn {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ============================================================
   ✅ نهاية الأنماط
   ============================================================ */

/* ✅ إصلاح: عرض اسم الصنف والسعر بشكل منفصل داخل كل عنصر بقائمة الطلب */
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    gap: 12px;
}
.order-items {
    margin: 6px 0;
}

/* ✅ إصلاح: فصل رقم الطلب عن التاريخ + جعل رقم الطلب واضح ومميز */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.order-id {
    font-weight: 800;
    font-size: 16px;
    color: #ff6b35;
    background: #fff0e8;
    padding: 3px 12px;
    border-radius: 8px;
    white-space: nowrap;
}
.order-time {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

/* ============================================================
   ✅ بطاقات الإحصائيات القابلة للضغط + القائمة التي تظهر أسفلها
   ============================================================ */
.stat-card-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.stat-card-clickable.stat-card-active {
    outline: 3px solid #2d3436;
    outline-offset: 2px;
}
.stats-list-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: 2px solid #ffe0d0;
    border-radius: 12px;
}
.stats-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.stats-list-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #2d3436;
}
.stats-list-summary {
    font-size: 0.9rem;
    color: #636e72;
    margin-bottom: 0.8rem;
}
.stats-list-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    color: #636e72;
}
