        :root {
            --color-primary: #FF5A00;
            --color-secondary: #FF8C38;
            --color-accent: #FFB800;
            --color-background: #F7F9F8;
            --color-card: #FFFFFF;
            --color-darker: #F0F4F3;
            --color-white: #1A1A1A;
            --color-muted: #717171;
            --border-subtle: rgba(0, 0, 0, 0.08);
            --card-bg: #FFFFFF;
            --border-color: rgba(0, 0, 0, 0.1);
            --darker-bg: #F0F4F3;
            --header-height: 70px;
            --bottom-nav-height: 68px;
            --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
            --c-new: #FF5A00;
            --c-accepted: #8B5CF6;
            --c-preparing: #F59E0B;
            --c-ready: #00B14F;
            --c-onway: #3B82F6;
            --c-delivered: #14B8A6;
            --c-reject: #EF4444;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html,
        body {
            height: 100%;
            width: 100%;
            overscroll-behavior: none;
        }

        body {
            font-family: 'Noto Sans Arabic', system-ui, sans-serif;
            background-color: var(--color-background);
            color: var(--color-white);
            transition: background-color 0.3s, color 0.3s;
            overflow-x: hidden;
        }

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

        ::-webkit-scrollbar-track {
            background: var(--color-background);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: #FF8C38;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #FF5A00;
        }

        #mainHeader {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--header-height);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 12px;
            border-bottom: 1px solid var(--border-subtle);
            background: var(--color-background);
            z-index: 110;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
        }

        .brand-logo {
            width: 46px;
            height: 46px;
            border-radius: 12px;
            object-fit: contain;
            flex-shrink: 0;
            background: transparent;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-shrink: 0;
        }

        .notification-btn {
            position: relative;
            background: none;
            border: none;
            cursor: pointer;
            color: var(--color-muted);
            font-size: 1.5rem;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
            flex-shrink: 0;
            text-decoration: none;
        }

        .notification-btn:hover {
            color: #FF5A00;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            border-radius: 40px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.25s ease;
            border: 1px solid transparent;
            flex-shrink: 0;
            text-decoration: none;
        }

        .status-pill.open {
            background: rgba(0, 177, 79, 0.1);
            color: #00B14F;
            border-color: rgba(0, 177, 79, 0.3);
        }

        .status-pill.closed {
            background: rgba(239, 68, 68, 0.1);
            color: #EF4444;
            border-color: rgba(239, 68, 68, 0.3);
        }

        .status-pill .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.4;
            }
        }

        main {
            padding-top: var(--header-height);
            padding-bottom: 0;
        }

        @media (max-width: 1024px) {
            main {
                padding-bottom: calc(var(--bottom-nav-height) + 20px);
            }
        }

        .bottom-mobile-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: var(--bottom-nav-height);
            background: var(--card-bg);
            border-top: 1px solid var(--border-color);
            z-index: 100;
            padding: 6px 8px;
            padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
            box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
            align-items: center;
            justify-content: space-around;
            gap: 4px;
        }

        @media (max-width: 1024px) {
            .bottom-mobile-nav {
                display: flex;
            }
        }

        .bottom-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            flex: 1;
            padding: 8px 4px;
            border-radius: 12px;
            cursor: pointer;
            text-decoration: none;
            color: var(--color-muted);
            font-size: 0.68rem;
            font-weight: 600;
            transition: all 0.25s ease;
            position: relative;
            min-width: 0;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }

        .bottom-nav-item i {
            font-size: 1.35rem;
            transition: all 0.25s ease;
            flex-shrink: 0;
        }

        .bottom-nav-item span {
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            max-width: 100%;
            font-size: 0.65rem;
            letter-spacing: 0.2px;
        }

        .bottom-nav-item.active {
            color: var(--color-primary);
        }

        .bottom-nav-item.active i {
            font-size: 1.5rem;
        }

        .bottom-nav-item-center {
            position: relative;
            top: -20px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--color-primary);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(255, 90, 0, 0.4);
            transition: all 0.3s ease;
            flex-shrink: 0;
            flex: none;
            margin: 0 4px;
        }

        .bottom-nav-item-center i {
            font-size: 2rem;
        }

        .bottom-nav-item-center span {
            display: none;
        }

        .bottom-nav-item-center.active {
            background: #e04e00;
            color: #fff;
        }

        .section-title {
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--color-white);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-title i {
            color: #FF5A00;
        }

        .restaurant-banner {
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 24px;
            background: linear-gradient(135deg, #FF5A00 0%, #FF8C38 100%);
            color: #fff;
            box-shadow: 0 10px 28px rgba(255, 90, 0, 0.28);
            position: relative;
            overflow: hidden;
        }

        .restaurant-banner::before {
            content: "";
            position: absolute;
            top: -50px;
            left: -50px;
            width: 200px;
            height: 200px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 50%;
        }

        .restaurant-banner::after {
            content: "";
            position: absolute;
            bottom: -80px;
            right: -30px;
            width: 180px;
            height: 180px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 50%;
        }

        .restaurant-banner .rb-inner {
            position: relative;
            z-index: 2;
        }

        .rb-logo {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid rgba(255, 255, 255, 0.4);
            background: #fff;
            flex-shrink: 0;
        }

        .rb-name {
            font-size: 1.15rem;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .rb-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 600;
        }

        .rb-meta span {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .date-tabs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            padding: 4px;
            background: var(--card-bg);
            border-radius: 14px;
            border: 1px solid var(--border-color);
            width: fit-content;
            max-width: 100%;
        }

        .date-tab {
            padding: 9px 18px;
            border-radius: 10px;
            background: transparent;
            border: none;
            font-family: inherit;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--color-muted);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            -webkit-tap-highlight-color: transparent;
        }

        .date-tab:hover {
            color: var(--color-primary);
            background: rgba(255, 90, 0, 0.06);
        }

        .date-tab.active {
            background: linear-gradient(135deg, #FF5A00, #FF8C38);
            color: #fff;
            box-shadow: 0 4px 12px rgba(255, 90, 0, 0.3);
        }

        .kpi-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 18px;
            padding: 16px;
            box-shadow: var(--shadow-card);
            display: flex;
            align-items: flex-start;
            gap: 12px;
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }

        .kpi-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
        }

        .kpi-icon {
            width: 46px;
            height: 46px;
            border-radius: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            flex-shrink: 0;
        }

        .kpi-icon.orange {
            background: rgba(255, 90, 0, 0.12);
            color: #FF5A00;
        }

        .kpi-icon.green {
            background: rgba(0, 177, 79, 0.12);
            color: #00B14F;
        }

        .kpi-icon.blue {
            background: rgba(59, 130, 246, 0.12);
            color: #3B82F6;
        }

        .kpi-icon.purple {
            background: rgba(139, 92, 246, 0.12);
            color: #8B5CF6;
        }

        .kpi-icon.red {
            background: rgba(239, 68, 68, 0.12);
            color: #EF4444;
        }

        .kpi-icon.teal {
            background: rgba(20, 184, 166, 0.12);
            color: #14B8A6;
        }

        .kpi-icon.amber {
            background: rgba(245, 158, 11, 0.12);
            color: #F59E0B;
        }

        .kpi-body {
            min-width: 0;
            flex: 1;
        }

        .kpi-label {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--color-muted);
            margin-bottom: 4px;
        }

        .kpi-value {
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--color-white);
            line-height: 1.1;
            font-variant-numeric: tabular-nums;
        }

        .kpi-trend {
            font-size: 0.7rem;
            font-weight: 700;
            margin-top: 6px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }

        .kpi-trend.up {
            color: #00B14F;
        }

        .kpi-trend.down {
            color: #EF4444;
        }

        .kpi-trend.neutral {
            color: var(--color-muted);
        }

        .chart-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 18px;
            box-shadow: var(--shadow-card);
            display: flex;
            flex-direction: column;
        }

        .chart-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
            gap: 12px;
            flex-wrap: wrap;
        }

        .chart-title {
            font-size: 0.95rem;
            font-weight: 800;
            color: var(--color-white);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .chart-title i {
            color: var(--color-primary);
            font-size: 1.2rem;
        }

        .chart-container {
            position: relative;
            width: 100%;
            height: 280px;
        }

        .chart-container canvas {
            max-width: 100%;
        }

        .top-item-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px dashed var(--border-color);
        }

        .top-item-row:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .top-item-rank {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            background: rgba(255, 90, 0, 0.1);
            color: #FF5A00;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 800;
            flex-shrink: 0;
        }

        .top-item-rank.rank-1 {
            background: linear-gradient(135deg, #FFD700, #FFA500);
            color: #fff;
        }

        .top-item-rank.rank-2 {
            background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
            color: #fff;
        }

        .top-item-rank.rank-3 {
            background: linear-gradient(135deg, #CD7F32, #B87333);
            color: #fff;
        }

        .top-item-info {
            min-width: 0;
            flex: 1;
        }

        .top-item-name {
            font-size: 0.85rem;
            font-weight: 800;
            color: var(--color-white);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .top-item-meta {
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--color-muted);
            margin-top: 2px;
        }

        .top-item-revenue {
            font-size: 0.85rem;
            font-weight: 800;
            color: #00B14F;
            flex-shrink: 0;
            font-variant-numeric: tabular-nums;
        }

        .orders-table-wrap {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .orders-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.8rem;
            min-width: 680px;
        }

        .orders-table thead th {
            text-align: right;
            padding: 10px 12px;
            background: var(--darker-bg);
            font-weight: 800;
            font-size: 0.72rem;
            color: var(--color-muted);
            border-bottom: 1px solid var(--border-color);
            white-space: nowrap;
        }

        .orders-table tbody td {
            padding: 12px;
            border-bottom: 1px solid var(--border-subtle);
            font-weight: 600;
            color: var(--color-white);
            white-space: nowrap;
        }

        .orders-table tbody tr:last-child td {
            border-bottom: none;
        }

        .orders-table tbody tr:hover {
            background: rgba(255, 90, 0, 0.03);
        }

        .table-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 30px;
            font-size: 0.68rem;
            font-weight: 700;
        }

        .tb-new {
            background: rgba(255, 90, 0, 0.12);
            color: #FF5A00;
        }

        .tb-accepted {
            background: rgba(139, 92, 246, 0.12);
            color: #8B5CF6;
        }

        .tb-preparing {
            background: rgba(245, 158, 11, 0.15);
            color: #F59E0B;
        }

        .tb-ready {
            background: rgba(0, 177, 79, 0.12);
            color: #00B14F;
        }

        .tb-onway {
            background: rgba(59, 130, 246, 0.12);
            color: #3B82F6;
        }

        .tb-delivered {
            background: rgba(20, 184, 166, 0.12);
            color: #14B8A6;
        }

        .tb-cancelled {
            background: rgba(239, 68, 68, 0.12);
            color: #EF4444;
        }

        .export-btn {
            padding: 9px 16px;
            border-radius: 11px;
            font-family: inherit;
            font-weight: 700;
            font-size: 0.78rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid var(--border-color);
            background: var(--card-bg);
            color: var(--color-white);
            -webkit-tap-highlight-color: transparent;
        }

        .export-btn:hover {
            border-color: var(--color-primary);
            color: var(--color-primary);
        }

        .export-btn.primary {
            background: linear-gradient(135deg, #FF5A00, #FF8C38);
            color: #fff;
            border-color: transparent;
            box-shadow: 0 4px 12px rgba(255, 90, 0, 0.3);
        }

        .export-btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(255, 90, 0, 0.4);
        }

        .empty-state {
            background: var(--card-bg);
            border: 2px dashed var(--border-color);
            border-radius: 20px;
            padding: 40px 20px;
            text-align: center;
            color: var(--color-muted);
        }

        .empty-state i {
            font-size: 3rem;
            color: #FF8C38;
            opacity: 0.5;
            display: block;
            margin-bottom: 12px;
        }

        .toast-container {
            position: fixed;
            top: 80px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 8px;
            pointer-events: none;
            width: calc(100% - 32px);
            max-width: 420px;
        }

        .toast {
            background: var(--card-bg);
            border-radius: 14px;
            padding: 12px 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--color-white);
            animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-right: 4px solid var(--color-primary);
            pointer-events: auto;
            line-height: 1.5;
        }

        .toast i {
            font-size: 1.4rem;
            flex-shrink: 0;
        }

        .toast span {
            flex: 1;
            word-break: break-word;
        }

        .toast.success {
            border-right-color: #00B14F;
        }

        .toast.success i {
            color: #00B14F;
        }

        .toast.error {
            border-right-color: #EF4444;
        }

        .toast.error i {
            color: #EF4444;
        }

        @keyframes toast-in {
            from {
                opacity: 0;
                transform: translateY(-20px) scale(0.96);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .toast.hiding {
            animation: toast-out 0.3s ease forwards;
        }

        @keyframes toast-out {
            to {
                opacity: 0;
                transform: translateY(-20px) scale(0.96);
            }
        }

        @media (max-width: 640px) {
            .section-title {
                font-size: 1rem;
            }

            .brand-logo {
                width: 42px;
                height: 42px;
            }

            .rb-logo {
                width: 52px;
                height: 52px;
            }

            .rb-name {
                font-size: 1rem;
            }

            .kpi-value {
                font-size: 1.25rem;
            }

            .kpi-icon {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }

            .chart-container {
                height: 240px;
            }

            .date-tab {
                padding: 8px 14px;
                font-size: 0.75rem;
            }
        }