<?php

declare(strict_types=1);

require_once __DIR__ . '/stat_path.php';


$statCspNonce = '';
if (isset($nonce) && is_string($nonce) && preg_match('/\A[A-Za-z0-9+\/=_.-]{8,160}\z/', $nonce) === 1) {
    $statCspNonce = $nonce;
}

if (!function_exists('statNonceAttr')) {
    function statNonceAttr(string $nonce): string
    {
        return $nonce === '' ? '' : ' nonce="' . statH($nonce) . '"';
    }
}

if (!function_exists('statNormalizedPath')) {
    function statNormalizedPath(string $path): string
    {
        $path = trim($path);

        if ($path === '' || preg_match('/[\x00-\x1F\x7F]/', $path) === 1) {
            return '/';
        }

        $pathOnly = parse_url($path, PHP_URL_PATH);
        if (!is_string($pathOnly) || $pathOnly === '') {
            return '/';
        }

        $pathOnly = '/' . trim($pathOnly, '/');

        return $pathOnly === '/' ? '/' : $pathOnly . '/';
    }
}

if (!function_exists('statNavIsActive')) {
    function statNavIsActive(string $targetPath): bool
    {
        $requestUri = $_SERVER['REQUEST_URI'] ?? '/';
        $requestPath = is_string($requestUri) ? $requestUri : '/';

        $current = statNormalizedPath($requestPath);
        $target = statNormalizedPath(statUrl($targetPath));

        return $current === $target;
    }
}

$statNavItems = [
    ['label' => 'Realtime', 'path' => '/realtime/', 'icon' => 'fa-line-chart'],
    ['label' => 'Performance', 'path' => '/performance/', 'icon' => 'fa-dashboard'],
    ['label' => 'Clicks', 'path' => '/clicks/', 'icon' => 'fa-mouse-pointer'],
    ['label' => 'Postback', 'path' => '/postback/', 'icon' => 'fa-exchange'],
];
?>
<!DOCTYPE html>
<html>

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <title>Lead Report!</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link href="<?= statH(statAssetUrl('/favicon.ico')) ?>" rel="icon" type="image/x-icon" />
    <link rel="stylesheet" href="<?= statH(statAssetUrl('/dist/bootstrap.min.css')) ?>" type="text/css" media="all">
    <link href="<?= statH(statAssetUrl('/dist/jquery.bootgrid.css')) ?>" rel="stylesheet" />
    <link href="<?= statH(statAssetUrl('/dist/div.table.css')) ?>" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap.min.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="<?= statH(statAssetUrl('/dist/flags.css')) ?>">
    <script src="<?= statH(statAssetUrl('/dist/jquery-1.11.1.min.js')) ?>"></script>
    <script src="<?= statH(statAssetUrl('/dist/bootstrap.min.js')) ?>"></script>
    <script src="<?= statH(statAssetUrl('/dist/jquery.bootgrid.min.js')) ?>"></script>
    <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>
    <script src="<?= statH(statAssetUrl('/dist/FileSaver.min.js')) ?>"></script>
    <script src="<?= statH(statAssetUrl('/dist/Blob.min.js')) ?>"></script>
    <script src="<?= statH(statAssetUrl('/dist/xls.core.min.js')) ?>"></script>
    <script src="<?= statH(statAssetUrl('/dist/tableexport.js')) ?>"></script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@500;600&display=swap" rel="stylesheet">
    <style<?= statNonceAttr($statCspNonce); ?>>:root{color-scheme:light;--bg:#f8fafd;--surface:#f0f3f8;--panel:rgba(255,255,255,.72);--panel2:#fff;--line:#e2e8f0;--line2:rgba(68,71,70,.07);--text:#444746;--muted:#6e7370;--strong:#1f2221;--primary:#444746;--primary2:#1f2221;--accent:#444746;--accent-h:#1f2221;--accent-s:rgba(68,71,70,.10);--on:#fff;--bad:#6e7370;--good:#444746;--warn:#6e7370;--radius:.3rem;--shadow:none;--shadow-modal:none;--font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;--mono:"SFMono-Regular",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--panel-soft:var(--panel2);--panel-raised:var(--panel);--panel-fade:#f8f9fa;--line-soft:var(--line2);--text-strong:var(--strong);--dark:var(--strong);--light:var(--bg);--accent-hover:var(--accent-h);--accent-soft:var(--accent-s);--on-accent:var(--on);--danger:var(--bad);--danger-soft:rgba(108,117,125,.10);--success:var(--good);--success-soft:rgba(73,80,87,.10);--ok:var(--good);--ok-soft:rgba(73,80,87,.10);--blue-soft:var(--accent-s);--blue-line:rgba(68,71,70,.28);--nav:#fff;--btn:var(--text);--stroke:var(--line);--inverse:var(--strong);--faded:var(--bg);--font-cursive:cursive;--font-mono:monospace}@media (prefers-color-scheme:dark){:root{color-scheme:dark;--bg:#212529;--surface:#343a40;--panel:rgba(33,37,41,.72);--panel2:#343a40;--line:#495057;--line2:rgba(248,249,250,.06);--text:#e9ecef;--muted:#6e7370;--strong:#f8f9fa;--primary:#e9ecef;--primary2:#f8f9fa;--accent:#495057;--accent-h:#adb5bd;--accent-s:rgba(173,181,189,.12);--on:#212529;--bad:#6e7370;--good:#adb5bd;--warn:#6e7370;--shadow:none;--shadow-modal:none;--panel-soft:var(--panel2);--panel-raised:var(--panel);--panel-fade:#212529;--line-soft:var(--line2);--text-strong:var(--strong);--accent-hover:var(--accent-h);--accent-soft:var(--accent-s);--on-accent:var(--on);--danger:var(--bad);--danger-soft:rgba(108,117,125,.12);--success:var(--good);--success-soft:rgba(173,181,189,.12);--ok:var(--good);--ok-soft:rgba(173,181,189,.12);--blue-soft:var(--accent-s);--blue-line:rgba(173,181,189,.30);--nav:#212529;--btn:var(--text);--stroke:var(--line)}}*{box-sizing:border-box}html,body{width:100%;height:100dvh;margin:0;}html{background:var(--bg);zoom:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}body{font-family:var(--font);padding:58px 8px 18px!important;background:linear-gradient(180deg,#fff 0%,#f8fafd 100%)!important;color:var(--text)!important;font-size:13px;line-height:1.45;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}.container{width:100%;max-width:1180px;margin:0 auto}code{font-family:Consolas,Monaco,"Courier New",monospace;font-size:11.5px;color:var(--text);background:var(--panel-soft);border:1px solid var(--line-soft);border-radius:var(--radius);padding:1px 4px}.navbar.navbar-default{min-height:44px;border:0!important;border-bottom:0!important;background:#fff!important;box-shadow:var(--shadow)!important;backdrop-filter:blur(18px) saturate(180%);-webkit-backdrop-filter:blur(18px) saturate(180%)}.navbar .container{max-width:1180px}.navbar-brand{height:44px!important;padding:12px 10px!important;color:var(--text-strong)!important;font-size:13px;line-height:20px}.navbar-nav>li>a{padding-top:12px!important;padding-bottom:12px!important;line-height:20px!important;color:var(--text)!important;font-size:12px}.navbar-nav>li>a:hover,.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{background:var(--accent)!important;color:var(--on-accent)!important}.navbar-toggle{margin-top:5px!important;margin-bottom:5px!important;border-color:var(--line)!important;border-radius:var(--radius)!important;background:var(--panel)!important}.navbar-toggle .icon-bar{background:var(--text)!important}.panel,.panel-default,.well,.modal-content{border:0!important;border-radius:var(--radius)!important;background:var(--panel)!important;color:var(--text)!important;box-shadow:var(--shadow)!important;backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);overflow:hidden}.panel-heading,.panel-footer,.modal-header,.modal-footer{padding:8px 10px!important;background:#f5f5f5!important;border:0!important;color:var(--text-strong)!important}.panel-body,.modal-body{padding:10px!important;background:transparent!important;color:var(--text)!important}.pull-right{display:flex;align-items:center;gap:6px}.modal-content{box-shadow:var(--shadow-modal)!important}.modal-title{font-size:14px;font-weight:700;color:var(--text-strong)}.close{color:var(--text)!important;opacity:.78;text-shadow:none}.form-group{margin-bottom:8px}.control-label,label{margin-bottom:4px;color:var(--text-strong);font-size:12px}.form-control,input[type=text],input[type=number],input[type=password],input[type=search],select,textarea{height:31px;min-height:31px;border:1px solid var(--line)!important;border-radius:var(--radius)!important;background:var(--panel)!important;color:var(--text)!important;font-family:inherit!important;font-size:12px!important;line-height:1.4!important;box-shadow:none!important}.form-control:focus,input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent)!important;box-shadow:none!important}.form-control::placeholder,textarea::placeholder{color:color-mix(in srgb,var(--text) 54%,transparent)}.form-control[readonly],input[readonly],textarea[readonly]{background:var(--panel-soft)!important;color:var(--text)!important}textarea.form-control{height:auto;min-height:114px;resize:none}.input-group-addon{height:31px;padding:5px 8px;background:transparent!important;border-color:var(--line)!important;color:var(--text)!important;border-radius:var(--radius)!important;font-size:11.5px}.btn,button,.btn-sm,.btn-xs{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid var(--line)!important;border-radius:var(--radius)!important;background:var(--panel)!important;color:var(--text)!important;font-size:11.5px;font-weight:700;line-height:1.2;box-shadow:none!important;outline:none;transition:background .12s ease,border-color .12s ease,color .12s ease}.btn:hover,button:hover,.btn-sm:hover,.btn-xs:hover{background:var(--panel-soft)!important;border-color:var(--line)!important;color:var(--text-strong)!important}.btn-primary,.btn-primary:focus,.btn-primary:active,.btn.active{background:var(--accent)!important;border-color:var(--accent)!important;color:var(--on-accent)!important}.btn-primary:hover{background:var(--accent-hover)!important;border-color:var(--accent-hover)!important;color:var(--on-accent)!important}.btn-danger,.btn-danger:focus{background:var(--danger-soft)!important;border-color:rgba(108,117,125,.34)!important;color:var(--danger)!important}.btn-danger:hover{background:rgba(108,117,125,.16)!important;color:var(--danger)!important}.glyphicon{top:1px;color:currentColor}.action-ico{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.action-ico svg{display:block}.table-responsive{border:0!important}.table{width:100%;margin:0;border-collapse:collapse;border-spacing:0;border:0;border-radius:0;background:transparent!important}.table>thead>tr>th{height:34px;padding:0 12px!important;text-align:left;font-size:11px;font-weight:600;color:var(--text-strong)!important;text-transform:uppercase;letter-spacing:.06em;background:#f5f5f5!important;border-bottom:1px solid var(--line)!important;border-top:0!important;white-space:nowrap;position:static}.table>tbody>tr>td,.table>tfoot>tr>td{padding:6px 12px!important;vertical-align:middle;border-bottom:1px solid var(--line-soft)!important;border-top:0!important;font-size:12.5px;font-weight:400;color:var(--text)!important;word-break:break-word;background:transparent!important}.table>tbody>tr:last-child>td{border-bottom:0!important}.table>tfoot>tr>th{padding:7px 12px!important;border-top:1px solid var(--line)!important;border-bottom:0!important;background:#f5f5f5!important;color:var(--text-strong)!important;font-size:11px!important;font-weight:600;text-transform:uppercase;letter-spacing:.06em}.table-hover>tbody>tr:hover>td{background:var(--panel-soft)!important}.table-striped>tbody>tr:nth-of-type(odd)>td{background:transparent!important}.bootgrid-table th>.column-header-anchor{color:var(--text-strong)!important}.bootgrid-header,.bootgrid-footer{margin:6px 0!important;color:var(--text)!important}.bootgrid-header .search .form-control{height:31px}.bootgrid-header .actionBar{text-align:right}.pagination>li>a,.pagination>li>span{border-color:var(--line)!important;background:var(--panel)!important;color:var(--text)!important}.pagination>.active>a,.pagination>.active>span{background:var(--accent)!important;border-color:var(--accent)!important;color:var(--on-accent)!important}.dropdown-menu{border:0!important;border-radius:var(--radius)!important;background:#fff!important;box-shadow:var(--shadow-modal)!important}.dropdown-menu>li>a{color:var(--text)!important;font-size:12px}.dropdown-menu>li>a:hover{background:var(--panel-soft)!important;color:var(--text-strong)!important}.alert{border-radius:var(--radius)!important}.alert-danger,.error{background:var(--danger-soft)!important;border-color:rgba(108,117,125,.28)!important;color:var(--danger)!important}.alert-success,.success{background:var(--blue-soft)!important;border-color:var(--blue-line)!important;color:var(--text)!important}.label{border-radius:var(--radius)!important}.label-default{background:var(--panel-soft)!important;color:var(--text)!important;border:1px solid var(--line)}blockquote{margin:0 0 10px;padding:7px 10px;border-left:2px solid var(--line)!important;background:var(--panel-fade);border-radius:var(--radius);font-size:12px}.text-warning{margin:0 0 2px;color:var(--text-strong)!important;font-weight:700}.text-muted{color:var(--text)!important}.flag{border-radius:var(--radius)}/* div-layout (click/ method rows) */.method .list-header .header{font-size:11px!important;font-weight:600!important;color:var(--text-strong)!important;text-transform:uppercase;letter-spacing:.06em;background:var(--panel-soft)!important;padding:6px 12px!important;border-bottom:1px solid var(--line)!important}.method .cell{font-size:12.5px!important;color:var(--text)!important;padding:5px 12px!important;line-height:1.4}.method .cell code{font-size:11.5px;color:var(--blue-line)}.method [class^="row"],.method [class*=" row"]{border-bottom:1px solid var(--line-soft)!important}.method [class^="row"]:hover,.method [class*=" row"]:hover{background-color:var(--panel-soft)!important}@media screen and (max-width:768px){body{padding:58px 6px 12px!important;font-size:12.5px}.container{width:100%!important;max-width:100%!important;padding-left:6px!important;padding-right:6px!important}.panel-heading,.panel-body,.panel-footer{padding:7px!important;background:#f5f5f5!important}.navbar .container{padding-left:8px!important;padding-right:8px!important}.navbar-collapse{border-color:var(--line)!important;background:var(--panel)!important}.pull-right{float:none!important;justify-content:flex-end}.table{display:block;overflow-x:auto;white-space:nowrap}}/* panel & modal shadow override */.panel,.panel-default{box-shadow:none!important}.modal-content{box-shadow:none!important}/* navbar active underline */.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{box-shadow:none!important;background:transparent!important;color:var(--text-strong)!important}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{background:transparent!important;color:var(--text-strong)!important;box-shadow:none!important}/* shared layout helpers */.panel_m{margin-top:4px}.pn-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.pn-export{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:0 0 auto}.tbl-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;flex-wrap:wrap;border-bottom:1px solid #eee;background:#f5f5f5}.tbl-toolbar-left{display:flex;align-items:center;gap:6px}.tbl-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-top:1px solid #eee;font-size:12px;color:var(--text);flex-wrap:wrap;background:#f5f5f5}/* source line */.rg-source .pre-colon{font-weight:700;color:var(--text-strong)}.rg-source .post-colon{font-family:Consolas,Monaco,"Courier New",monospace;color:var(--text)}/* logout toast */#logout-toast{position:fixed;right:12px;bottom:12px;z-index:10060;display:none;padding:8px 10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);color:var(--text);box-shadow:var(--shadow-modal);font-size:12px}#logout-toast.show{display:block}/* navbar logout link */.navbar-btn.btn-link{height:44px!important;margin:0!important;padding:12px 10px!important;border:0!important;background:transparent!important;color:var(--text)!important;text-decoration:none!important;box-shadow:none!important}.navbar-btn.btn-link:hover{background:transparent!important;color:var(--text-strong)!important}/* focus resets */input:focus,textarea:focus,select:focus,button:focus,.form-control:focus,.btn:focus,a:focus{outline:none!important}.form-control:focus,input:focus,select:focus,textarea:focus{box-shadow:none!important}*:focus,*:focus-visible{outline:none!important;box-shadow:none!important}/* ── Extended components (card / chip / btn-ghost / toast / canvas) ── */.card{border:1px solid var(--line);background:var(--panel);border-radius:var(--radius)}.btn-ghost{background:var(--faded)!important;color:var(--inverse)!important;border-color:var(--line)!important;box-shadow:none!important}.btn-ghost:hover{background:var(--panel-soft)!important;color:var(--text-strong)!important}.chip{display:inline-flex;align-items:center;padding:2px 8px;border:1px solid var(--line-soft);background:var(--panel-soft);border-radius:var(--radius);font-size:11px;color:var(--text);line-height:1.4}.toast{position:fixed;right:18px;bottom:18px;z-index:10070;display:none;align-items:center;gap:8px;background:var(--inverse);color:var(--faded);padding:10px 12px;font-size:12px;border:1px solid var(--line-soft);border-radius:var(--radius);box-shadow:var(--shadow-modal)}.toast.show{display:flex}canvas{display:block;width:100%;height:430px;border:1px solid var(--line);background:var(--panel);border-radius:var(--radius)}.app-sign{text-align:right;padding:3px 0 2px}.app-sign footer{font-family:'Caveat','Dancing Script',cursive;font-size:17px;font-weight:600;color:#444746;text-decoration:none;letter-spacing:.02em;line-height:1}select hr{border:none;border-top:1px solid rgba(68,71,70,.06)!important;color:rgba(68,71,70,.06)!important;opacity:.45;margin:1px 4px}input[type=url]{font-family:Consolas,Monaco,"Courier New",monospace!important}body::before{content:'NGIX\2022 XCTD';position:fixed;top:12px;left:14px;z-index:0;font:600 11px/1 Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;letter-spacing:.24em;text-transform:uppercase;color:rgba(68,71,70,.06);pointer-events:none}body::after{content:'';position:fixed;inset:0;z-index:0;pointer-events:none;background-image:url('/assets/favicon.svg'),url('/assets/bg.png');background-repeat:no-repeat,no-repeat;background-position:right 14px bottom 12px,center center;background-size:28px 28px,cover;opacity:.28;filter:saturate(.68) contrast(.84) brightness(1.03) blur(.32px);transform:translateZ(0)}</style><style<?= statNonceAttr($statCspNonce); ?>>
/* NGIX final patch: stable backdrop, right-click enabled, neutral highlight, CSP nonce-safe */
html{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
    background:var(--bg,#f8fafd)!important;
    zoom:1!important;
    -webkit-tap-highlight-color:transparent;
}
body{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:100vh!important;
    min-height:100svh!important;
    min-height:100dvh!important;
    margin:0!important;
    overflow-x:hidden!important;
    background:
        linear-gradient(rgba(255,255,255,.74),rgba(255,255,255,.90)),
        url('/assets/favicon.svg') right 14px bottom 12px/28px 28px no-repeat fixed,
        url('/assets/bg.png') center center/cover no-repeat fixed,
        var(--bg,#f8fafd)!important;
    background-color:var(--bg,#f8fafd)!important;
    color:var(--text,#444746)!important;
    -webkit-tap-highlight-color:transparent;
}
body::after{
    content:none!important;
    display:none!important;
    background:none!important;
}
body::before{
    z-index:1!important;
}
::selection{
    background:rgba(68,71,70,.16);
    color:inherit;
}
::-moz-selection{
    background:rgba(68,71,70,.16);
    color:inherit;
}
a,button,.btn,.navbar-toggle,.dropdown-menu>li>a,.pagination>li>a,.pagination>li>span,.chip,.label,.app-sign,svg{
    -webkit-user-select:none;
    user-select:none;
}
input,textarea,select,option,.form-control,.table,.table *,code,pre,blockquote,.modal-body,.panel-body{
    -webkit-user-select:text;
    user-select:text;
}
img,picture,svg,canvas{
    max-width:100%;
}
body>.container,.container,main,.app-shell,.app-footer{
    position:relative!important;
    z-index:2!important;
    max-width:1180px!important;
    overflow:visible!important;
}
.navbar.navbar-fixed-top,.navbar-fixed-top{
    position:fixed!important;
    top:0!important;
    right:0!important;
    left:0!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    border-radius:0!important;
    transform:none!important;
    z-index:1055!important;
}
.navbar.navbar-default{
    background:rgba(255,255,255,.82)!important;
}
.panel_m.panel{
    position:relative!important;
    overflow:hidden!important;
    isolation:isolate!important;
    background:rgba(255,255,255,.64)!important;
}
.panel_m.panel>.ngix-image-backdrop,.ngix-image-backdrop{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:100%!important;
    min-height:100%!important;
    z-index:0!important;
    pointer-events:none!important;
    background-image:
        linear-gradient(rgba(255,255,255,.86),rgba(255,255,255,.86)),
        url('<?= statH(statAssetUrl('/dist/ngix-backdrop.png')) ?>')!important;
    background-repeat:no-repeat,no-repeat!important;
    background-position:center center,center center!important;
    background-size:100% 100%,min(980px,120%) auto!important;
    opacity:.22!important;
    filter:saturate(.62) contrast(.84) blur(.12px)!important;
    transform:none!important;
    contain:paint!important;
}
.panel_m.panel>.panel-heading,
.panel_m.panel>.panel-body,
.panel_m.panel>.table-responsive,
.panel_m.panel>form{
    position:relative!important;
    z-index:2!important;
}
.table-responsive{
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
}
@supports (height:100lvh){
    body{
        min-height:100lvh!important;
    }
}
@media (prefers-color-scheme:dark){
    html{
        background:#212529!important;
    }
    body{
        background:
            linear-gradient(rgba(33,37,41,.78),rgba(33,37,41,.88)),
            url('/assets/favicon.svg') right 14px bottom 12px/28px 28px no-repeat fixed,
            url('/assets/bg.png') center center/cover no-repeat fixed,
            #212529!important;
    }
    .navbar.navbar-default{
        background:rgba(33,37,41,.82)!important;
    }
    .panel_m.panel{
        background:rgba(33,37,41,.72)!important;
    }
    .panel_m.panel>.ngix-image-backdrop,.ngix-image-backdrop{
        background-image:
            linear-gradient(rgba(33,37,41,.84),rgba(33,37,41,.84)),
            url('<?= statH(statAssetUrl('/dist/ngix-backdrop.png')) ?>')!important;
        opacity:.20!important;
        filter:saturate(.58) contrast(.78) blur(.16px)!important;
    }
    ::selection{
        background:rgba(248,249,250,.16);
        color:inherit;
    }
    ::-moz-selection{
        background:rgba(248,249,250,.16);
        color:inherit;
    }
}
@media screen and (max-width:768px){
    body{
        background-position:0 0,right 10px bottom 10px,center center!important;
        background-size:auto,24px 24px,cover!important;
    }
    body>.container,.container{
        max-width:100%!important;
    }
    .panel_m.panel>.ngix-image-backdrop,.ngix-image-backdrop{
        background-size:100% 100%,min(760px,140%) auto!important;
        background-position:center center,center center!important;
        opacity:.18!important;
    }
}
</style>

</head>

<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" aria-label="Statistics navigation">
    <div class="container">
        <div class="navbar-header">
            <button
                type="button"
                class="navbar-toggle collapsed"
                data-toggle="collapse"
                data-target="#statistics-navbar"
                aria-expanded="false"
                aria-controls="statistics-navbar"
            >
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?= statH(statUrl('/realtime/')); ?>">Lead Report</a>
        </div>

        <div class="collapse navbar-collapse" id="statistics-navbar">
            <ul class="nav navbar-nav">
                <?php foreach ($statNavItems as $statNavItem) : ?>
                    <?php
                    $statNavLabel = is_string($statNavItem['label'] ?? null) ? $statNavItem['label'] : '';
                    $statNavPath = is_string($statNavItem['path'] ?? null) ? $statNavItem['path'] : '/';
                    $statNavIcon = is_string($statNavItem['icon'] ?? null) ? $statNavItem['icon'] : 'fa-circle';
                    $statNavActive = statNavIsActive($statNavPath);
                    ?>
                    <li class="<?= $statNavActive ? 'active' : ''; ?>">
                        <a href="<?= statH(statUrl($statNavPath)); ?>">
                            <i class="fa <?= statH($statNavIcon); ?>" aria-hidden="true"></i>
                            <span><?= statH($statNavLabel); ?></span>
                        </a>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</nav>
