

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

        body {
            margin: 0;
            font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            color: var(--slate-900);
            background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
            line-height: 1.6;
            min-height: 100vh;
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        /* Motion */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(24px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        @keyframes pulseSoft {
            0%, 100% { opacity: 1; }
            50%      { opacity: 0.8; }
        }

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

        .fade-in {
            opacity: 0;
            animation: fadeInUp 0.6s ease-out forwards;
        }

        /* Shell layout */
        .page {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* Header */
        .header {
            position: sticky;
            top: 0;
            z-index: 1000;
            background: rgba(255,255,255,0.9);
            backdrop-filter: blur(18px);
            border-bottom: 1px solid rgba(0,190,110,0.15);
            box-shadow: 0 4px 24px rgba(0,0,0,0.05);
        }

        .header-inner {
            margin: 12px 20px;
            padding: 10px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 14px;
        }

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

        .logo-box {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 900;
            font-size: 24px;
            box-shadow: 0 8px 24px rgba(0,190,110,0.4);
            position: relative;
            overflow: hidden;
        }

        .logo-box::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
            background-size: 200% 100%;
            animation: shimmer 3s infinite;
        }

        .logo-text-block {
            display: flex;
            flex-direction: column;
        }

        .logo-title {
            font-size: 24px;
            font-weight: 900;
            letter-spacing: -0.03em;
            background: linear-gradient(135deg, var(--green-dark), var(--green), rgb(0,230,130));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo-subtitle {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--slate-500);
            font-weight: 600;
        }

        .mobile-menu-btn {
            display: none;
            border: none;
            border-radius: 12px;
            width: 42px;
            height: 42px;
            font-size: 20px;
            background: linear-gradient(135deg, var(--green), var(--green-dark));
            color: #fff;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(0,190,110,0.35);
        }

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

                .balance-pill {
            display: flex;
            align-items: center;
            height: 44px;
            padding: 0 22px;
            border-radius: 14px;
            background: linear-gradient(135deg, rgba(0,190,110,0.06), rgba(0,230,130,0.18));
            border: 1px solid rgba(0,190,110,0.25);
        }

        .balance-label {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            color: var(--slate-500);
        }

        .balance-value {
            font-size: 22px;
            font-weight: 900;
            background: linear-gradient(135deg, var(--green-dark), var(--green));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

                .user-pill {
            display: flex;
            align-items: center;
            gap: 12px;
            height: 44px;
            padding: 0 14px;
            border-radius: 14px;
            background: rgba(0,190,110,0.08);
            cursor: pointer;
            transition: background 0.25s ease, transform 0.25s ease;
        }

        .user-pill:hover {
            background: rgba(0,190,110,0.14);
            transform: translateY(-1px);
        }

        .user-pill:hover {
            background: rgba(0,190,110,0.14);
        }

        .user-text {
            text-align: right;
        }

        .user-name {
            font-size: 16px;
            font-weight: 700;
            color: var(--slate-900);
        }

        .user-meta {
            font-size: 12px;
            color: var(--slate-500);
        }

        .user-tag {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: 700;
        }

        .user-avatar {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 900;
            font-size: 18px;
            box-shadow: 0 6px 18px rgba(0,190,110,0.3);
            border: 3px solid #fff;
        }

        /* Body layout */
        .layout {
            display: flex;
            min-height: calc(100vh - 76px);
        }

        /* Sidebar (desktop base) */
        .sidebar {
            width: 260px;
            background: #fff;
            border-right: 1px solid rgba(0,190,110,0.12);
            box-shadow: 4px 0 28px rgba(0,0,0,0.03);
        }

        .sidebar-inner {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .sidebar-top-blocks {
            padding: 22px 20px 18px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            border-bottom: 1px solid rgba(0,190,110,0.12);
        }

        /* NEW: Referral mini summary in sidebar instead of Total completion */
        .sidebar-card {
            background: linear-gradient(135deg, rgba(0,190,110,0.08), rgba(0,230,130,0.10));
            border-radius: 16px;
            border: 1px solid rgba(0,190,110,0.25);
            padding: 18px 16px;
        }

        .sidebar-card-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--slate-500);
            text-transform: uppercase;
            letter-spacing: 0.7px;
            margin-bottom: 8px;
        }

        .sidebar-ref-summary {
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 12px;
            color: var(--slate-700);
        }

        .sidebar-ref-chip {
            margin-top: 4px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 9px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 600;
            background: rgba(34,197,94,0.10);
            color: #047857;
        }

        .success-bar-wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .success-bar-track {
            flex: 1;
            height: 8px;
            background: rgba(0,190,110,0.2);
            border-radius: 999px;
            overflow: hidden;
        }

        .success-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--green), rgb(0,230,130));
            box-shadow: 0 0 10px rgba(0,190,110,0.55);
        }

        .success-value {
            font-size: 18px;
            font-weight: 900;
            color: var(--green-dark);
        }

        /* Mobile-only Available Balance + profile chip, hidden on desktop */
        .sidebar-balance-mobile {
            display: none;
        }

        .sidebar-profile-chip {
            display: none;
        }

        .sidebar-nav {
            list-style: none;
            margin: 18px 0 0;
            padding: 0 0 16px;
        }

        .sidebar-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 22px;
            font-size: 14px;
            font-weight: 600;
            color: var(--slate-500);
            border-left: 4px solid transparent;
            transition: all 0.25s ease;
            position: relative;
        }

        .sidebar-link-icon {
            font-size: 20px;
        }

        .sidebar-link:hover {
            color: var(--green);
            background: rgba(0,190,110,0.06);
            border-left-color: var(--green);
        }

        .sidebar-link--active {
            color: var(--green);
            background: rgba(0,190,110,0.09);
            border-left-color: var(--green);
        }

        .sidebar-link-dot {
            position: absolute;
            right: 20px;
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: var(--green);
            opacity: 0;
            transform: scale(0.9);
            transition: opacity 0.25s ease, transform 0.25s ease;
        }

        .sidebar-link--active .sidebar-link-dot {
            opacity: 1;
            transform: scale(1);
        }

        .sidebar-separator {
            margin: 18px 0;
            padding: 0 22px;
        }

        .sidebar-separator-line {
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(0,190,110,0.4), transparent);
        }

        .sidebar-link--danger:hover {
            color: #ef4444;
            border-left-color: #ef4444;
            background: rgba(239,68,68,0.08);
        }

        /* Main column */
        .main {
            flex: 1;
            padding: 32px 36px 40px;
            background: #ffffff;
        }

        .welcome {
            margin-bottom: 30px;
        }

        .welcome-title {
            font-size: 36px;
            font-weight: 900;
            letter-spacing: -0.03em;
            margin-bottom: 6px;
        }

        .welcome-name {
            background: linear-gradient(135deg, var(--green-dark), var(--green));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .welcome-text {
            font-size: 15px;
            color: var(--slate-500);
            font-weight: 500;
        }

        /* Stats cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 22px;
            margin-bottom: 34px;
        }

        .card {
            background: #fff;
            border-radius: var(--radius-lg);
            padding: 24px 22px;
            border: 1px solid rgba(0,190,110,0.14);
            box-shadow: var(--shadow-soft);
            position: relative;
            overflow: hidden;
            transition: transform 0.25s ease, box-shadow 0.25s ease;
        }

        .card:hover {
            transform: translateY(-6px);
            box-shadow: 0 18px 48px rgba(0,0,0,0.10);
        }

        .card--primary {
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            color: #fff;
            border-color: rgba(0,190,110,0.8);
            box-shadow: var(--shadow-strong);
        }

        .card-decoration {
            position: absolute;
            right: -40px;
            top: -40px;
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: rgba(255,255,255,0.20);
            filter: blur(30px);
        }

        .card-icon {
            font-size: 54px;
            margin-bottom: 12px;
        }

        .card-label {
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            color: var(--slate-500);
            margin-bottom: 8px;
        }

        .card--primary .card-label {
            color: rgba(255,255,255,0.85);
        }

        .card-value {
            font-size: 30px;
            font-weight: 900;
            margin-bottom: 10px;
        }

        .card-value--gradient {
            background: linear-gradient(135deg, var(--green-dark), var(--green));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .card-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 700;
        }

        .card-pill--primary {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }

        .card-pill--green {
            background: rgba(0,190,110,0.08);
            color: var(--green-dark);
        }

        .card-pill--amber {
            background: var(--amber-soft);
            color: #f59e0b;
        }

        .card-pill--purple {
            background: var(--purple-soft);
            color: var(--purple);
        }

        /* Banner */
        .banner {
            border-radius: var(--radius-lg);
            padding: 26px 26px 24px;
            margin-bottom: 34px;
            background: linear-gradient(135deg, var(--violet), #8b5cf6);
            color: #fff;
            position: relative;
            overflow: hidden;
            box-shadow: 0 12px 40px rgba(99,102,241,0.3);
        }

        .banner-blur {
            position: absolute;
            right: -80px;
            top: -80px;
            width: 260px;
            height: 260px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            filter: blur(55px);
        }

        .banner-inner {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 22px;
        }

        .banner-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            border-radius: 999px;
            background: rgba(255,255,255,0.22);
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 12px;
        }

        .banner-title {
            font-size: 24px;
            font-weight: 900;
            margin-bottom: 8px;
        }

        .banner-text {
            font-size: 14px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 16px;
        }

        .banner-btn {
            border: none;
            border-radius: 12px;
            padding: 12px 26px;
            font-size: 14px;
            font-weight: 800;
            color: var(--violet);
            background: #fff;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(0,0,0,0.25);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .banner-btn:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 8px 24px rgba(0,0,0,0.30);
        }

        .banner-emoji {
            font-size: 90px;
            opacity: 0.32;
        }

        /* Section header & tasks */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .section-title {
            font-size: 24px;
            font-weight: 900;
        }

        .section-subtitle {
            font-size: 14px;
            color: var(--slate-500);
            font-weight: 500;
        }

        .section-actions {
            display: flex;
            gap: 10px;
        }

        .btn {
            padding: 10px 18px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 700;
            border: 2px solid #e5e7eb;
            background: #fff;
            color: var(--slate-900);
            cursor: pointer;
            transition: all 0.25s ease;
        }

        .btn--outline:hover {
            border-color: var(--green);
            color: var(--green);
        }

        .btn--primary {
            border-color: transparent;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            color: #fff;
            box-shadow: 0 4px 16px rgba(0,190,110,0.3);
        }

        .btn--primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,190,110,0.4);
        }

        .tasks-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 22px;
            margin-bottom: 30px;
        }

        .task-card {
            background: #fff;
            border-radius: var(--radius-lg);
            border: 1px solid #e5e7eb;
            padding: 22px 20px 24px;
            box-shadow: var(--shadow-soft);
            display: flex;
            flex-direction: column;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28),
                        box-shadow 0.25s ease, border-color 0.25s ease;
        }

        .task-card--spotlight {
            background: linear-gradient(
                135deg,
                rgba(0,190,110,0.12),
                rgba(0,230,130,0.18)
            );
            border-color: rgba(0,190,110,0.30);
            box-shadow: var(--shadow-soft);
            position: relative;
            overflow: hidden;
        }

        .task-card--spotlight::after {
            content: "";
            position: absolute;
            top: -20px;
            right: -20px;
            width: 90px;
            height: 90px;
            border-radius: 50%;
            background: rgba(0,190,110,0.26);
            filter: blur(34px);
            pointer-events: none;
        }

        .task-card--spotlight > * {
            position: relative;
            z-index: 1;
        }

        .task-card:hover {
            transform: translateY(-8px) scale(1.01);
            border-color: var(--green);
            box-shadow: 0 18px 48px rgba(0,0,0,0.16);
        }

        .task-badge-row {
            display: flex;
            align-items: center;
            gap: 6px;
            min-height: 22px;
            margin-bottom: 10px;
        }

        .task-badge-row--empty {
            visibility: hidden;
        }

        .task-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #fff;
            box-shadow: 0 4px 12px rgba(0,0,0,0.16);
        }

        .task-badge--urgent {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            animation: pulseSoft 2s infinite;
        }

        .task-badge--featured {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
        }

        .task-badge--exclusive {
            background: linear-gradient(135deg, #0ea5e9, #6366f1);
        }

        .task-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
        }

        .task-icon {
            font-size: 60px;
        }

        .task-reward {
            text-align: right;
        }

        .task-reward-value {
            padding: 8px 16px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            color: #fff;
            font-weight: 900;
            font-size: 18px;
            box-shadow: 0 4px 14px rgba(0,190,110,0.35);
            margin-bottom: 6px;
        }

        .task-difficulty {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .task-difficulty--easy {
            color: var(--green-dark);
        }

        .task-difficulty--medium {
            color: #eab308;
        }

        .task-difficulty--hard {
            color: #dc2626;
        }

        .task-category {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            background: rgba(0,190,110,0.10);
            color: var(--green-dark);
            margin-bottom: 10px;
        }

        .task-title {
            font-size: 17px;
            font-weight: 800;
            margin-bottom: 8px;
            color: var(--slate-900);
        }

        .task-description {
            font-size: 14px;
            color: var(--slate-500);
            margin-bottom: 16px;
        }

        .task-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 14px;
            border-top: 1px solid #e5e7eb;
        }

        .task-meta {
            display: flex;
            gap: 14px;
            font-size: 13px;
            color: var(--slate-500);
            font-weight: 600;
        }

        .task-cta {
            border: none;
            border-radius: 10px;
            padding: 9px 18px;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(0,190,110,0.35);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .task-cta:hover {
            transform: scale(1.04);
            box-shadow: 0 6px 18px rgba(0,190,110,0.4);
        }

        /* Bottom area */
        .bottom-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 22px;
        }

        .recent {
            background: #ffffff;
            border-radius: 16px;
            border: 1px solid #e5e7eb;
            padding: 0;
            overflow: hidden;
            box-shadow: var(--shadow-soft);
        }

        .recent-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 18px 10px;
            margin-bottom: 0;
        }

        .recent-title {
            font-size: 20px;
            font-weight: 900;
        }

        .recent-subtitle {
            font-size: 13px;
            color: var(--slate-500);
        }

        .recent-link {
            font-size: 14px;
            font-weight: 700;
            color: var(--green);
        }

        .recent-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 18px;
            background: #ffffff;
            border-bottom: 1px solid #e5e7eb;
        }

        .recent-row:not(.recent-row-head):nth-of-type(even) {
            background: #f9fafb;
        }

        .recent-row:not(.recent-row-head):hover {
            background: #ecfdf5;
        }

        .recent-row:last-child {
            border-bottom: none;
        }

        .recent-row-head {
            background: #f3f4f6;
            padding: 8px 18px;
            border-bottom: 1px solid #e5e7eb;
        }

        .recent-head-label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--slate-500);
            font-weight: 600;
            white-space: nowrap;
        }

        .recent-main {
            flex: 1;
            min-width: 0;
        }

        .recent-task {
            font-size: 15px;
            font-weight: 700;
            color: var(--slate-900);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 4px;
        }

        .recent-meta {
            display: flex;
            gap: 8px;
            font-size: 12px;
            color: var(--slate-500);
            font-weight: 600;
            align-items: center;
        }

        .recent-type-pill {
            padding: 3px 8px;
            border-radius: 999px;
            font-size: 11px;
            text-transform: uppercase;
            background: rgba(148,163,184,0.14);
            color: #0f172a;
        }

        .recent-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
            margin-left: 14px;
        }

        .recent-amount {
            font-size: 13px;
            font-weight: 700;
            color: var(--slate-900);
        }

        .recent-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
        }

        .recent-status--completed {
            background: rgba(34,197,94,0.10);
            color: #047857;
        }

        .recent-status--pending {
            background: rgba(59,130,246,0.12);
            color: #1d4ed8;
        }

        .recent-status-icon {
            font-size: 12px;
        }

        .side-column {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .side-card {
            background: #fff;
            border-radius: var(--radius-lg);
            border: 1px solid #e5e7eb;
            padding: 24px 22px 22px;
            box-shadow: var(--shadow-soft);
        }

        .side-title {
            font-size: 18px;
            font-weight: 800;
            margin-bottom: 16px;
        }

        .quick-actions-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .quick-btn {
            width: 100%;
            border-radius: 12px;
            border: 2px solid #e5e7eb;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 700;
            background: #fff;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .quick-btn span:first-child {
            font-size: 20px;
        }

        .quick-btn--primary {
            border-color: transparent;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            color: #fff;
            box-shadow: 0 4px 16px rgba(0,190,110,0.3);
        }

        .quick-btn--primary:hover {
            transform: translateX(4px);
            box-shadow: 0 6px 18px rgba(0,190,110,0.38);
        }

        .quick-btn--outline:hover {
            border-color: var(--green);
            color: var(--green);
            transform: translateX(4px);
        }

        .referral-card {
            position: relative;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(0,190,110,0.30);
            padding: 24px 22px 22px;
            background: linear-gradient(135deg, rgba(0,190,110,0.12), rgba(0,230,130,0.18));
            box-shadow: var(--shadow-soft);
            overflow: hidden;
        }

        .referral-blur {
            position: absolute;
            top: -20px;
            right: -20px;
            width: 90px;
            height: 90px;
            border-radius: 50%;
            background: rgba(0,190,110,0.26);
            filter: blur(34px);
        }

        .referral-inner {
            position: relative;
        }

        .referral-icon {
            font-size: 70px;
            margin-bottom: 14px;
        }

        .referral-title {
            font-size: 26px;
            font-weight: 800;
            margin-bottom: 8px;
            background: linear-gradient(135deg, var(--green-dark), var(--green));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .referral-text {
            font-size: 14px;
            color: var(--slate-500);
            margin-bottom: 16px;
        }

        .referral-btn {
            width: 100%;
            border: none;
            border-radius: 11px;
            padding: 12px 18px;
            font-size: 14px;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(135deg, var(--green), rgb(0,230,130));
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(0,190,110,0.35);
        }

        .referral-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 22px rgba(0,190,110,0.45);
        }

        /* Footer */
        .footer {
            border-top: 1px solid var(--slate-200);
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            color: #fff;
            margin-top: 0;
        }

        .footer-section {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .footer-section h3 {
            font-size: 18px;
            font-weight: 800;
        }

        /* Overlay for mobile drawer */
        #sidebarOverlay {
            position: fixed;
            inset: 0;
            background: rgba(15,23,42,0.45);
            z-index: 850;
            display: none;
        }

        /* ---------------- Media queries ---------------- */

        @media (max-width: 1200px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

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

            .footer-top {
                grid-template-columns: 1.5fr 1fr 1fr;
            }
        }

        @media (max-width: 992px) {
            .layout {
                min-height: auto;
            }

            .bottom-grid {
                grid-template-columns: 1fr;
            }

            .main {
                padding: 28px 22px 32px;
            }

            .footer-top {
                grid-template-columns: 1fr 1fr;
                gap: 28px;
            }
        }

        /* Mobile: full-width sidebar, logo on right, Available Balance + profile chip in sidebar */
        @media (max-width: 768px) {
            body {
                background: #f3f4f6;
            }

            .header-inner {
                margin: 8px 12px;
                padding: 4px 0;
            }

            .header-left {
                gap: 10px;
                width: 100%;
            }

            .header-logo {
                margin-left: auto;
            }

            .logo-title {
                font-size: 20px;
            }

            .logo-subtitle {
                font-size: 9px;
            }

            .mobile-menu-btn {
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Hide header-right; Available Balance + profile live in sidebar */
            .header-right {
                display: none;
            }

            .layout {
                flex-direction: column;
                min-height: auto;
            }

            /* Sidebar as full-width slide-in panel */
            .sidebar {
                position: fixed;
                top: 64px;
                left: -100%;
                width: 100%;
                height: calc(100vh - 64px);
                z-index: 900;
                overflow-y: auto;
                background: #ffffff;
                box-shadow: 0 0 0 rgba(0,0,0,0);
                transition: left 0.25s ease;
            }

            .sidebar--open {
                left: 0;
            }

            .sidebar-top-blocks {
                padding: 18px 16px 12px;
                border-bottom: 1px solid #e5e7eb;
                gap: 14px;
            }

            .sidebar-card { padding: 14px 14px; }
            .sidebar-balance-mobile,
            .sidebar-profile-chip { display: block; }
            .referral-hero-inner,
            .partner-hero-inner {
                flex-direction: column;
                gap: 16px;
            }

            /* Available Balance block inside sidebar, same look as desktop */
            .sidebar-balance-mobile {
                display: flex;
                flex-direction: column;
                justify-content: center;
                background: linear-gradient(135deg, rgba(0,190,110,0.06), rgba(0,230,130,0.18));
                border: 1px solid rgba(0,190,110,0.25);
                border-radius: 14px;
                padding: 10px 22px;
                min-height: 64px;
                color: inherit;
            }

            .sidebar-balance-label {
                font-size: 11px;
                font-weight: 700;
                letter-spacing: 0.5px;
                text-transform: uppercase;
                color: var(--slate-500);
                margin-bottom: 4px;
            }

            .sidebar-balance-value {
                font-size: 22px;
                font-weight: 900;
                background: linear-gradient(135deg, var(--green-dark), var(--green));
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
            }

            /* Profile chip inside sidebar, avatar left of name */
            .sidebar-profile-chip {
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 10px 22px;
                border-radius: 14px;
                background: rgba(0,190,110,0.06);
                min-height: 64px;
            }

            .sidebar-profile-avatar {
                width: 36px;
                height: 36px;
                border-radius: 12px;
                background: linear-gradient(135deg, var(--green), rgb(0,230,130));
                display: flex;
                align-items: center;
                justify-content: center;
                color: #fff;
                font-weight: 900;
                font-size: 18px;
                box-shadow: 0 6px 18px rgba(0,190,110,0.3);
                border: 2px solid #fff;
            }

            .sidebar-profile-text {
                display: flex;
                flex-direction: column;
            }

            .sidebar-profile-name {
                font-size: 15px;
                font-weight: 700;
            }

            .sidebar-profile-meta {
                font-size: 12px;
                color: var(--slate-500);
            }

            .sidebar-nav {
                margin-top: 10px;
            }

            .main {
                padding: 20px 14px 26px;
            }

            .welcome-title {
                font-size: 24px;
            }

            .welcome-text {
                font-size: 13px;
            }

            .stats-grid,
            .tasks-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .card {
                padding: 18px 16px;
            }

            .card-value {
                font-size: 24px;
            }

            .banner {
                padding: 18px 16px;
                margin-bottom: 24px;
            }

            .banner-inner {
                flex-direction: column;
                align-items: flex-start;
                gap: 14px;
            }

            .banner-title {
                font-size: 18px;
            }

            .banner-text {
                font-size: 13px;
            }

            .banner-emoji {
                font-size: 60px;
                opacity: 0.25;
            }

            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .section-title {
                font-size: 20px;
            }

            .section-subtitle {
                font-size: 13px;
            }

            .section-actions {
                width: 100%;
                justify-content: flex-start;
                gap: 8px;
            }

            .section-actions .btn {
                flex: 1;
                font-size: 13px;
                padding: 8px 10px;
            }

            .task-card {
                padding: 18px 16px 20px;
            }

            .task-header {
                align-items: center;
            }

            .task-icon {
                font-size: 48px;
            }

            .task-title {
                font-size: 16px;
            }

            .task-description {
                font-size: 13px;
            }

            .task-meta {
                font-size: 12px;
                gap: 10px;
            }

            .task-cta {
                padding: 8px 14px;
                font-size: 12px;
            }

            .bottom-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .recent,
            .side-card,
            .referral-card {
                padding: 18px 16px;
            }

            .recent-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
            }

            .recent-title {
                font-size: 18px;
            }

            .recent-subtitle {
                font-size: 12px;
            }

            .recent-task {
                font-size: 14px;
            }

            .recent-meta {
                font-size: 12px;
            }

            .quick-btn {
                padding: 10px 14px;
                font-size: 13px;
            }

            .referral-icon {
                font-size: 56px;
                margin-bottom: 10px;
            }

            .referral-title {
                font-size: 20px;
            }

            .referral-text {
                font-size: 13px;
            }

            .referral-btn {
                padding: 10px 14px;
                font-size: 13px;
            }

            .footer-top {
                grid-template-columns: 1fr;
                padding-inline: 12px;
                gap: 24px;
            }

            .footer-bottom {
                flex-direction: column;
                align-items: flex-start;
                padding-inline: 12px;
                gap: 10px;
            }
        }

        @media (max-width: 480px) {
            .header-inner {
                margin-inline: 8px;
            }

            .logo-title {
                font-size: 18px;
            }

            .welcome-title {
                font-size: 22px;
            }

            .card-icon {
                font-size: 44px;
            }

            .card-value {
                font-size: 22px;
            }

            .recent-row {
                padding: 8px 10px;
            }

            .recent-amount {
                font-size: 13px;
            }

            .footer-brand p {
                font-size: 13px;
            }

            .footer-section h3 {
                font-size: 16px;
            }

            .footer-section a {
                font-size: 13px;
            }
        }

/* Level Progress System */
.level-badge {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.level-progress-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 20px 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.level-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.level-info h2.level-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 8px 0;
}

.level-info p.level-description {
    font-size: 14px;
    color: var(--slate-500);
    margin: 0;
    line-height: 1.4;
}

.level-stats {
    display: flex;
    gap: 24px;
}

.level-stat {
    text-align: center;
}

.level-stat .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
}

.level-stat .stat-label {
    display: block;
    font-size: 12px;
    color: var(--slate-500);
    margin-top: 4px;
    font-weight: 500;
}

.level-progress-bar {
    position: relative;
    background: #f1f5f9;
    height: 32px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green) 0%, rgba(0, 190, 110, 0.8) 100%);
    border-radius: 16px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-700);
    z-index: 2;
}

.level-requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.requirement-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    transition: all 0.3s ease;
}

.requirement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.requirement-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.requirement-content {
    flex: 1;
}

.requirement-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-900);
    margin: 0 0 8px 0;
}

.requirement-progress {
    margin-bottom: 8px;
}

.progress-text {
    font-size: 12px;
    color: var(--slate-600);
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.mini-progress-bar {
    background: #e2e8f0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.requirement-pay {
    font-size: 12px;
    color: var(--slate-500);
    margin: 4px 0 0 0;
    font-weight: 500;
}

.requirement-limit {
    font-size: 11px;
    color: #f59e0b;
    margin: 4px 0 0 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .level-progress-section {
        margin: 16px;
        padding: 20px;
    }
    
    .level-progress-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .level-stats {
        justify-content: space-around;
        gap: 16px;
    }
    
    .level-info h2.level-title {
        font-size: 20px;
    }
    
    .level-requirements {
        grid-template-columns: 1fr;
    }
    
    .requirement-card {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .level-progress-section {
        margin: 12px;
        padding: 16px;
    }
    
    .level-info h2.level-title {
        font-size: 18px;
    }
    
    .level-stat .stat-value {
        font-size: 18px;
    }
    
    .progress-bar-text {
        font-size: 11px;
    }
    
    .requirement-card {
        padding: 12px;
        gap: 10px;
    }
    
    .requirement-icon {
        font-size: 20px;
        width: 36px;
        height: 36px;
    }
}
    
