  :root {
            --primary: #00aaff;
            --primary-dark: #008ecc;
            --primary-light: #e0f2fe;
            --bg-body: #f8faff;
            --bg-card: #ffffff;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --border-color: #e2e8f0;
            --sidebar-width: 260px;
            --header-height: 70px;
            --shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            --radius: 16px;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --purple: #8b5cf6;
            --navbar-height: 70px;
        }

        body.dark-mode {
            --primary: #53d6ff;
            --primary-dark: #00aaff;
            --primary-light: #1e3a8a;
            --bg-body: #0f172a;
            --bg-card: #1e293b;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --border-color: #334155;
            --shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
            transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
        }

        body {
            background-color: var(--bg-body);
            color: var(--text-main);
            overflow-x: hidden;
            min-height: 100vh;
            display: flex;
            padding-bottom: var(--navbar-height);
        }

        a { text-decoration: none; color: inherit; }
        ul { list-style: none; }

        /* SIDEBAR */
        .sidebar {
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--bg-card);
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1200;
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease;
        }

        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
            backdrop-filter: blur(3px);
        }
        
        .sidebar-overlay.active {
            display: block;
        }

        .brand {
            height: var(--header-height);
            display: flex;
            align-items: center;
            padding: 0 24px;
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
        }

        .brand-logo-img {
            width: 40px;
            height: 40px;
            margin-right: 12px;
            border-radius: 10px;
            object-fit: cover;
        }

        .brand-text {
            font-size: 20px;
            font-weight: 600;
            color: var(--primary);
        }



  
        .sidebar-menu {
            padding: 20px 0;
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
        }

        .sidebar-menu::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar-menu::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 3px;
        }

        .menu-item {
            padding: 12px 24px;
            display: flex;
            align-items: center;
            color: var(--text-muted);
            font-weight: 500;
            border-left: 4px solid transparent;
            margin-bottom: 2px;
            white-space: nowrap;
        }

        .menu-item i {
            width: 25px;
            font-size: 18px;
            margin-right: 12px;
            text-align: center;
        }

        .menu-item:hover, .menu-item.active {
            background: var(--primary-light);
            color: var(--primary);
            border-left-color: var(--primary);
        }

        .sidebar-footer {
            padding: 20px;
            border-top: 1px solid var(--border-color);
            margin-top: auto;
            flex-shrink: 0;
        }

        .logout-btn {
            width: 100%;
            padding: 12px;
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: 0.2s;
        }

        .logout-btn:hover {
            background: #ef4444;
            color: white;
        }

        /* MAIN CONTENT */
        .main-content {
            margin-left: var(--sidebar-width);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            width: calc(100% - var(--sidebar-width));
            flex-grow: 1;
        }


  
  .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo-img {
    display: flex;
    align-items: center;
}

.header-logo-img img {
    height: 38px;
    width: auto;
}

.header-brand-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
        .top-header {
            height: var(--header-height);
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 30px;
            position: sticky;
            top: 0;
            z-index: 900;
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
        }

        .menu-toggle {
            display: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--text-main);
        }

        .header-logo {
            height: 35px;
            width: auto;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .notif-btn {
            position: relative;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notif-btn i {
            font-size: 22px;
            color: var(--text-main);
        }

        .notif-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
            border: 2px solid var(--bg-card);
            z-index: 100;
        }

        .eye-toggle {
            background: var(--primary-light);
            border: none;
            color: var(--text-main);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            transition: 0.3s;
        }

        /* TICKER */
        .ticker-container {
            background: linear-gradient(90deg, var(--primary), var(--primary-dark));
            color: white;
            padding: 10px 0;
            overflow: hidden;
            position: relative;
            margin-bottom: 20px;
            border-radius: 8px;
            margin: 0 30px 20px 30px;
            box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
        }

        .ticker-content {
            display: flex;
            animation: ticker 30s linear infinite;
            white-space: nowrap;
            padding: 0 20px;
        }

        .ticker-item {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-right: 50px;
            font-size: 14px;
            font-weight: 500;
        }

        .ticker-highlight {
            background: rgba(255, 255, 255, 0.2);
            padding: 3px 10px;
            border-radius: 20px;
            font-weight: 600;
            margin-left: 5px;
        }

        @keyframes ticker {
            0% { transform: translateX(100%); }
            100% { transform: translateX(-100%); }
        }

        /* CONTAINER */
        .container {
            padding: 30px;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        /* REFERRAL HERO */
        .referral-hero {
            background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
            border-radius: var(--radius);
            padding: 40px 30px;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            color: white;
            text-align: center;
        }

        .hero-title {
            font-size: 32px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }

        .hero-subtitle {
            font-size: 16px;
            opacity: 0.95;
            margin-bottom: 30px;
        }

        .referral-link-box {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .link-label {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 10px;
        }

        .link-display {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .link-input {
            flex: 1;
            padding: 10px 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 14px;
            font-weight: 500;
        }

        .icon-btn {
            background: white;
            color: var(--primary);
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            transition: 0.3s;
        }

        .icon-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        /* SHARE BUTTONS */
        .share-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .share-btn {
            flex: 1;
            min-width: 140px;
            padding: 14px 20px;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            color: white;
            transition: 0.3s;
        }

        .share-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        .share-btn.whatsapp { background: #25D366; }
        .share-btn.telegram { background: #0088cc; }
        .share-btn.twitter { background: #1DA1F2; }
        .share-btn.facebook { background: #1877F2; }

        /* REFERRED BY SECTION */
        .referred-by-section {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
        }

        .section-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .referred-by-card {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 20px;
            background: var(--primary-light);
            border-radius: 12px;
            border: 2px solid var(--primary);
        }

        .referrer-avatar {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--purple));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 28px;
            flex-shrink: 0;
        }

        .referrer-info h3 {
            font-size: 20px;
            color: var(--text-main);
            margin-bottom: 5px;
        }

        .referrer-info p {
            font-size: 14px;
            color: var(--text-muted);
            margin-bottom: 10px;
        }

        .referrer-badges {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

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

        .stat-card {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 30px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 15px;
            transition: 0.3s;
        }

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

        .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
        }

        .stat-icon.total { background: var(--primary); }
        .stat-icon.earner { background: var(--purple); }
        .stat-icon.advertiser { background: #06b6d4; }
        .stat-icon.earnings { background: var(--success); }

        .stat-info h4 {
            font-size: 11px;
            color: var(--text-muted);
            margin-bottom: 5px;
            text-transform: uppercase;
            font-weight: 600;
        }

        .stat-value {
            font-size: 25px;
            font-weight: 700;
            color: var(--text-main);
        }

        /* FILTERS */
        .filter-section {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 20px;
            margin-bottom: 25px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
        }

        .filter-row {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            align-items: flex-end;
        }

        .filter-group {
            flex: 1;
            min-width: 200px;
        }

        .filter-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text-main);
            font-size: 14px;
        }

        .filter-input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-body);
            color: var(--text-main);
            font-size: 14px;
            transition: 0.3s;
            border-left: 5px solid var(--primary);
        }

        .filter-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
        }

        .filter-select {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-body);
            color: var(--text-main);
            font-size: 14px;
            cursor: pointer;
            border-left: 5px solid var(--primary);
        }

        /* TABLE */
        .table-container {
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            overflow: hidden;
            margin-top: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border-color);
        }

        .table-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .table-header h3 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 18px;
        }

        .refresh-btn {
            background: var(--success);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: 0.3s;
        }

        .refresh-btn:hover {
            background: #0ea572;
        }

        .table-wrapper {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            flex: 1;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 1000px;
        }

        th {
            background: var(--primary-light);
            color: var(--primary);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 12px;
            letter-spacing: 0.5px;
            padding: 15px 20px;
            text-align: left;
            white-space: nowrap;
            border-bottom: 1px solid var(--border-color);
        }

        td {
            padding: 15px 20px;
            border-bottom: 1px solid var(--border-color);
            vertical-align: middle;
        }

        tbody tr:hover {
            background: var(--primary-light);
        }

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

        .user-avatar {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--purple));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 18px;
            flex-shrink: 0;
        }

        .user-details h4 {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 3px;
        }

        .user-details p {
            font-size: 12px;
            color: var(--text-muted);
        }

        .status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
            border: 1px solid transparent;
        }

        .status-active {
            background: rgba(16, 185, 129, 0.1);
            color: #10b981;
            border-color: rgba(16, 185, 129, 0.2);
        }

        .status-pending {
            background: rgba(245, 158, 11, 0.1);
            color: #f59e0b;
            border-color: rgba(245, 158, 11, 0.2);
        }

        .status-suspended {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.2);
        }

        .account-badge {
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            display: inline-block;
        }

        .account-earner {
            background: rgba(139, 92, 246, 0.1);
            color: var(--purple);
        }

        .account-advertiser {
            background: rgba(6, 182, 212, 0.1);
            color: #06b6d4;
        }

        .activity-stats {
            font-size: 13px;
            color: var(--text-main);
        }

        .activity-stats i {
            color: var(--primary);
            margin-right: 5px;
        }

        /* PAGINATION */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-top: 30px;
            padding: 20px;
            border-top: 1px solid var(--border-color);
            background: var(--bg-card);
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
        }

        .pagination-btn {
            padding: 8px 15px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-card);
            color: var(--text-main);
            cursor: pointer;
            font-weight: 600;
            transition: 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pagination-btn:hover:not(:disabled) {
            background: var(--primary-light);
            color: var(--primary);
            border-color: var(--primary);
        }

        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .pagination-info {
            color: var(--text-muted);
            font-size: 14px;
        }

        /* BOTTOM NAVBAR */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: var(--nav-height);
            background: var(--bg-card);
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-around;
            align-items: center;
            z-index: 1000;
            padding: 0 20px;
            box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
        }
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
            color: var(--text-muted);
            cursor: pointer;
            padding: 10px 15px;
            border-radius: 10px;
            transition: 0.3s;
            flex: 1;
            max-width: 80px;
        }
        .nav-item i { font-size: 22px; }
        .nav-item span { font-size: 11px; font-weight: 500; }
        .nav-item.active, .nav-item:hover { color: var(--primary); background: var(--primary-light); }

        /* TOAST */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .toast {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 15px 20px;
            min-width: 300px;
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            gap: 15px;
            animation: slideInRight 0.3s ease;
            border-left: 5px solid var(--primary);
            border: 1px solid var(--border-color);
        }

        .toast.success { border-left-color: #10b981; }
        .toast.error { border-left-color: #ef4444; }
        .toast.info { border-left-color: var(--primary); }

        .toast-icon { font-size: 20px; }
        .toast.success .toast-icon { color: #10b981; }
        .toast.error .toast-icon { color: #ef4444; }
        .toast.info .toast-icon { color: var(--primary); }

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

        /* RESPONSIVE */
        @media (max-width: 768px) {
            .menu-toggle { display: block; }
            .sidebar { transform: translateX(-100%); width: 280px; }
            .sidebar.active { transform: translateX(0); }
            .main-content { margin-left: 0; width: 100%; }
            .container { padding: 20px 15px; }
            .stats-grid { grid-template-columns: 1fr; }
            .ticker-container { margin: 0 15px 15px 15px; }
            .filter-row { flex-direction: column; }
            .filter-group { min-width: 100%; }
            .share-buttons { flex-direction: column; }
            .share-btn { min-width: 100%; }
            table { min-width: 800px; }
            .bottom-nav { display: flex; }
            .hero-title { font-size: 24px; }
        }

        /* LOGOUT MODAL */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 9999; align-items: center; justify-content: center; }
        .modal-overlay.active { display: flex; }
        @keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

        .menu-group-label {
            padding: 16px 24px 5px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 1.2px;
            text-transform: uppercase;
            color: var(--text-muted);
            opacity: 0.55;
            pointer-events: none;
            user-select: none;
            list-style: none;
        }