  :root {
            /* Light Theme */
            --primary: #ff6b6b;
            --primary-hover: #ff5252;
            --primary-light: rgba(255, 107, 107, 0.1);
            --background: #f9fafb;
            --card-bg: #ffffff;
            --sidebar-bg: #ffffff;
            --text-primary: #333333;
            --text-secondary: #555555;
            --text-muted: #777777;
            --border-color: #eaeaea;
            --hover-bg: #f3f4f6;
            --shadow-color: rgba(0, 0, 0, 0.04);
            --shadow-hover: rgba(0, 0, 0, 0.08);
            
            /* Button Colors */
            --primary-btn-bg: #ebf5ff;
            --primary-btn-color: #0d6efd;
            --secondary-btn-bg: #f8f9fa;
            --secondary-btn-color: #333333;
            --success-btn-bg: #ebfbee;
            --success-btn-color: #38c976;
            --info-btn-bg: #f2eaff;
            --info-btn-color: #6f42c1;
            --warning-btn-bg: #ffd43b;
            --warning-btn-color: #ffffff;
            --danger-btn-bg: #ffebee;
            --danger-btn-color: #ff6b6b;
            --dark-btn-bg: #212529;
            --dark-btn-color: #ffffff;
            
            /* Card Colors */
            --tools-color: #6366f1;
            --tools-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.01) 100%);
            --expiry-color: #10b981;
            --expiry-gradient: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.01) 100%);
            --subscription-color: #f59e0b;
            --subscription-gradient: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.01) 100%);
        }

        [data-theme="dark"] {
            /* Dark Theme */
            --primary: #ff6b6b;
            --primary-hover: #ff5252;
            --primary-light: rgba(255, 107, 107, 0.15);
            --background: #121212;
            --card-bg: #1e1e1e;
            --sidebar-bg: #1a1a1a; /* Dedicated sidebar color for dark mode */
            --text-primary: #ffffff;
            --text-secondary: #cccccc;
            --text-muted: #999999;
            --border-color: #2c2c2c;
            --hover-bg: #252525;
            --shadow-color: rgba(0, 0, 0, 0.2);
            --shadow-hover: rgba(0, 0, 0, 0.4);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
        }

        body {
            background-color: var(--background);
            color: var(--text-primary);
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .container {
            max-width: 1440px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        /* Layout Structure */
        .app-layout {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar - Hidden by default */
        .sidebar {
            width: 70px;
            background: var(--sidebar-bg);
            box-shadow: 0 0 15px var(--shadow-color);
            z-index: 100;
            transition: all 0.3s ease;
            overflow: hidden;
            position: fixed;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .sidebar.expanded {
            width: 280px;
        }

        .sidebar-brand {
            padding: 1.25rem 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid var(--border-color);
            overflow: hidden;
        }

        .sidebar-brand h1 {
            display: none;
            font-size: 1.5rem;
            color: #000;
            font-weight: 700;
            margin-left: 1rem;
            white-space: nowrap;
        }

        .sidebar.expanded .sidebar-brand h1 {
            display: block;
        }

        .sidebar-brand img {
            height: 40px;
            width: 40px;
            object-fit: contain;
        }
[data-theme="dark"] .sidebar-brand h1 {
    color: #ffffff;
}
        .sidebar-nav {
            padding: 1rem 0;
            flex: 1;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--primary) transparent;
            min-height: 0; /* Ensures flex item can shrink */
            max-height: calc(100vh - 200px); /* Reserve space for brand, toggle, and profile */
        }
        
        /* Custom scrollbar styling */
        .sidebar-nav::-webkit-scrollbar {
            width: 6px;
        }
        
        .sidebar-nav::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .sidebar-nav::-webkit-scrollbar-thumb {
            background-color: rgba(255, 107, 107, 0.3);
            border-radius: 8px;
            border: 2px solid transparent;
        }
        
        .sidebar-nav::-webkit-scrollbar-thumb:hover {
            background-color: var(--primary);
        }

        .sidebar-nav ul {
            list-style: none;
        }

        /* Main Navigation Items */
        .nav-item {
            margin: 0.2rem 0.5rem;
        }

        .nav-link {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.75rem 0.5rem;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.2s ease;
            border-radius: 0.5rem;
            font-weight: 500;
            cursor: pointer;
            position: relative;
        }

        .sidebar.expanded .nav-link {
            justify-content: space-between;
            padding: 0.75rem 1.5rem;
        }

        .nav-link:hover,
        .nav-link.active {
            color: var(--primary);
            background-color: var(--primary-light);
            transform: translateX(3px);
        }

        .nav-link-content {
            display: flex;
            align-items: center;
        }

        .nav-link i {
            font-size: 1.25rem;
            width: 1.5rem;
            text-align: center;
        }

        .sidebar.expanded .nav-link i {
            margin-right: 0.75rem;
        }

        .nav-link span {
            display: none;
            white-space: nowrap;
        }

        .sidebar.expanded .nav-link span {
            display: block;
        }

        /* Dropdown Arrow */
        .dropdown-arrow {
            display: none !important;
            font-size: 0.5rem;
            color: var(--text-muted);
            transition: all 0.3s ease;
            opacity: 0.15;
            font-weight: 100;
        }

        .sidebar.expanded .dropdown-arrow {
            display: block !important;
        }

        .nav-item.expanded .dropdown-arrow {
            transform: rotate(90deg);
            opacity: 0.25;
        }

        .nav-link:hover .dropdown-arrow {
            opacity: 0.35;
        }

        /* Ensure dropdowns are completely hidden when sidebar is collapsed */
        .sidebar:not(.expanded) .dropdown-arrow {
            display: none !important;
            visibility: hidden;
        }

        /* Dropdown Menu */
        .nav-dropdown {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background-color: rgba(0, 0, 0, 0.02);
            margin: 0.2rem 0;
            border-radius: 0.5rem;
        }

        [data-theme="dark"] .nav-dropdown {
            background-color: rgba(255, 255, 255, 0.02);
        }

        .nav-item.expanded .nav-dropdown {
            max-height: 500px;
        }

        .dropdown-item {
            display: block;
            padding: 0.6rem 1.5rem 0.6rem 3rem;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            position: relative;
        }

        .dropdown-item::before {
            content: '•';
            position: absolute;
            left: 2.2rem;
            color: var(--text-muted);
        }

        .dropdown-item:hover {
            color: var(--primary);
            background-color: var(--primary-light);
            padding-left: 3.2rem;
        }

        .dropdown-item:hover::before {
            color: var(--primary);
        }

        /* Hide dropdowns when sidebar is collapsed */
        .sidebar:not(.expanded) .nav-dropdown {
            display: none;
        }

        /* Moved sidebar toggle above user profile */
        .sidebar-toggle-container {
            padding: 1rem;
            display: flex;
            justify-content: center;
            border-top: 1px solid var(--border-color);
            flex-shrink: 0; /* Prevent the toggle container from shrinking */
            background: var(--sidebar-bg); /* Ensure background */
        }

        .sidebar.expanded .sidebar-toggle-container {
            justify-content: flex-end;
            padding-right: 1.5rem;
        }

        /* NEW: Mobile Menu Actions */
        .mobile-menu-actions {
            display: none;
            border-top: 1px solid var(--border-color);
            padding: 1rem 0;
            flex-shrink: 0; /* Prevent shrinking */
            background: var(--sidebar-bg); /* Ensure background */
        }

        .mobile-menu-actions ul {
            list-style: none;
        }

        .mobile-menu-actions ul li a {
            display: flex;
            align-items: center;
            padding: 0.75rem 1.5rem;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.2s ease;
            border-radius: 0.5rem;
            margin: 0.2rem 0.5rem;
            font-weight: 500;
        }

        .mobile-menu-actions ul li a:hover {
            color: var(--primary);
            background-color: var(--primary-light);
        }

        .mobile-menu-actions ul li a i {
            font-size: 1.25rem;
            width: 1.5rem;
            text-align: center;
            margin-right: 0.75rem;
        }

        .mobile-menu-actions ul li a.theme-toggle i {
            color: #10b981;
        }

        .mobile-menu-actions ul li a.notification i {
            color: #6366f1;
        }

        .mobile-menu-actions ul li a.upgrade {
            color: white;
            background-color: var(--primary);
            margin: 0.5rem 1rem;
            border-radius: 8px;
            padding: 0.75rem 1.5rem;
            font-weight: 600;
            box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
        }

        .mobile-menu-actions ul li a.upgrade i {
            color: white;
        }

        .mobile-menu-close {
            position: fixed;
            bottom: 1rem;
            right: 1rem;
            background-color: var(--primary);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
            z-index: 1001;
        }

        .user-profile {
            padding: 1rem 0.5rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: center;
            flex-shrink: 0; /* Prevent the user profile from shrinking */
            position: relative;
            z-index: 10;
            margin-top: auto; /* Push to bottom */
            background: var(--sidebar-bg); /* Ensure background */
        }

        .sidebar.expanded .user-profile {
            padding: 1rem 1.5rem;
            justify-content: flex-start;
        }

        .profile-brief {
            display: flex;
            align-items: center;
        }

        .profile-brief img {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }

        .profile-info {
            display: none;
            min-width: 0; /* Prevent text overflow issues */
        }

        .sidebar.expanded .profile-info {
            display: block;
            margin-left: 0.75rem;
        }

        .profile-info h6 {
            font-size: 0.9rem;
            margin-bottom: 0.2rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .profile-info span {
            font-size: 0.8rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: 70px;
            padding: 1.5rem;
            transition: margin-left 0.3s ease;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--primary-light) transparent;
        }
        
        /* Main content scrollbar */
        .main-content::-webkit-scrollbar {
            width: 8px;
        }
        
        .main-content::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .main-content::-webkit-scrollbar-thumb {
            background-color: rgba(255, 107, 107, 0.2);
            border-radius: 8px;
            border: 2px solid var(--background);
        }
        
        .main-content::-webkit-scrollbar-thumb:hover {
            background-color: rgba(255, 107, 107, 0.5);
        }

        .sidebar.expanded ~ .main-content {
            margin-left: 280px;
        }

        /* Topbar */
        .topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
            background-color: var(--card-bg);
            padding: 1rem 1.5rem;
            border-radius: 12px;
            box-shadow: 0 4px 12px var(--shadow-color);
        }

        .welcome-title h1 {
            font-size: 1.75rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .welcome-title p {
            color: var(--text-secondary);
            font-size: 0.95rem;
            margin-top: 0.25rem;
        }

        .search-container {
            flex: 1;
            max-width: 400px;
            margin: 0 1rem;
        }

        .topbar-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        /* Colorful Icons */
        .action-icon {
            height: 40px;
            width: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            background-color: var(--primary-light);
        }

        .action-icon:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px var(--shadow-color);
        }

        .action-icon i {
            color: var(--primary);
            font-size: 1.2rem;
        }

        .action-icon.notification {
            background-color: rgba(99, 102, 241, 0.1);
        }
        
        .action-icon.notification i {
            color: #6366f1;
        }
        
        .action-icon.theme {
            background-color: rgba(16, 185, 129, 0.1);
        }
        
        .action-icon.theme i {
            color: #10b981;
        }

        /* Buttons from screenshots */
        .button {
            padding: 0.5rem 1.25rem;
            border-radius: 8px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .button-primary {
            background-color: var(--primary-btn-bg);
            color: var(--primary-btn-color);
        }

        .button-secondary {
            background-color: var(--secondary-btn-bg);
            color: var(--secondary-btn-color);
        }

        .button-success {
            background-color: var(--success-btn-bg);
            color: var(--success-btn-color);
        }

        .button-info {
            background-color: var(--info-btn-bg);
            color: var(--info-btn-color);
        }

        .button-warning {
            background-color: var(--warning-btn-bg);
            color: var(--warning-btn-color);
        }

        .button-danger {
            background-color: var(--danger-btn-bg);
            color: var(--danger-btn-color);
        }

        .button-dark {
            background-color: var(--dark-btn-bg);
            color: var(--dark-btn-color);
        }

        /* Upgrade Button */
        .upgrade-button {
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 0.75rem 1.5rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
        }

        .upgrade-button:hover {
            background-color: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(255, 107, 107, 0.4);
        }

        .upgrade-button i {
            margin-right: 0.5rem;
        }

        /* Category Tabs */
        .category-tabs {
            display: flex;
            overflow-x: auto;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid var(--border-color);
            scrollbar-width: none;
            padding-bottom: 0;
            gap: 0.5rem;
        }

        .category-tabs::-webkit-scrollbar {
            height: 5px;
        }
        
        .category-tabs::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .category-tabs::-webkit-scrollbar-thumb {
            background-color: rgba(255, 107, 107, 0.3);
            border-radius: 8px;
        }
        
        .category-tabs::-webkit-scrollbar-thumb:hover {
            background-color: var(--primary);
        }

        .category-tab {
            padding: 0.75rem 1.5rem;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            white-space: nowrap;
            position: relative;
            transition: all 0.3s ease;
            border-radius: 0;
            background-color: transparent;
        }

        .category-tab:hover {
            color: var(--primary);
        }

        .category-tab.active {
            color: var(--primary);
            font-weight: 600;
            background-color: transparent;
        }

        .category-tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--primary);
        }

        /* Tools Section Header */
        .tools-header {
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            margin-top: 2rem;
        }

        .tools-header h2 {
            font-size: 1.25rem;
            font-weight: 600;
            position: relative;
            padding-left: 0.75rem;
            color: var(--text-primary);
        }

        .tools-header h2::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            height: 70%;
            width: 3px;
            background-color: var(--primary);
            border-radius: 2px;
        }

        /* Premium Stats Section */
        .stats-section {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .stat-card {
            background-color: var(--card-bg);
            border-radius: 16px;
            padding: 1.25rem;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
            position: relative;
            transition: all 0.3s ease;
            overflow: hidden;
            height: 130px;
            display: flex;
            z-index: 1;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            opacity: 0.4;
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }

        .stat-card:hover::before {
            opacity: 0.6;
        }

        /* Tool Card Styling */
        .stat-card.tools {
            border-left: 3px solid var(--tools-color);
        }
        
        .stat-card.tools::before {
            background: var(--tools-gradient);
        }
        
        .stat-card.tools .stat-icon {
            background-color: rgba(99, 102, 241, 0.15);
            color: var(--tools-color);
        }

        /* Expiry Card Styling */
        .stat-card.expiry {
            border-left: 3px solid var(--expiry-color);
        }
        
        .stat-card.expiry::before {
            background: var(--expiry-gradient);
        }
        
        .stat-card.expiry .stat-icon {
            background-color: rgba(16, 185, 129, 0.15);
            color: var(--expiry-color);
        }

        /* Subscription Card Styling */
        .stat-card.subscription {
            border-left: 3px solid var(--subscription-color);
        }
        
        .stat-card.subscription::before {
            background: var(--subscription-gradient);
        }
        
        .stat-card.subscription .stat-icon {
            background-color: rgba(245, 158, 11, 0.15);
            color: var(--subscription-color);
        }

        /* Content Layout */
        .stat-left {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            width: 70%;
        }

        .stat-right {
            width: 30%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .stat-header {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
        }

        .stat-value {
            font-size: 2.25rem;
            font-weight: 800;
            margin-bottom: 0.5rem;
            line-height: 1;
            position: relative;
        }

        .stat-card.tools .stat-value {
            color: var(--tools-color);
        }

        .stat-card.expiry .stat-value {
            color: var(--expiry-color);
        }

        .stat-card.subscription .stat-value {
            color: var(--subscription-color);
            font-size: 1.75rem;
        }

        .stat-footer {
            font-size: 0.8rem;
            font-weight: 500;
        }

        .stat-indicator {
            display: inline-flex;
            align-items: center;
            font-weight: 600;
            padding: 0.25rem 0.5rem;
            border-radius: 0.5rem;
            font-size: 0.7rem;
            margin-left: 0.5rem;
        }

        .stat-indicator.positive {
            background-color: rgba(16, 185, 129, 0.1);
            color: #10b981;
        }

        .stat-indicator i {
            margin-right: 0.25rem;
            font-size: 0.7rem;
        }

        .stat-footer.with-icon {
            display: flex;
            align-items: center;
        }

        .stat-footer i {
            margin-right: 0.35rem;
        }

        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .stat-icon i {
            font-size: 1.5rem;
        }

        /* Decorative Elements */
        .stat-card::after {
            content: '';
            position: absolute;
            width: 150px;
            height: 150px;
            border-radius: 50%;
            right: -75px;
            top: -75px;
            z-index: -1;
            opacity: 0.05;
        }

        .stat-card.tools::after {
            background: var(--tools-color);
        }

        .stat-card.expiry::after {
            background: var(--expiry-color);
        }

        .stat-card.subscription::after {
            background: var(--subscription-color);
        }

        .checkmark {
            color: #10b981;
        }

        /* Progress Bar for Expiry */
        .progress-container {
            width: 100%;
            height: 5px;
            background-color: rgba(0, 0, 0, 0.05);
            border-radius: 3px;
            margin-top: 5px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            border-radius: 3px;
            background: linear-gradient(90deg, #10b981, #34d399);
            width: 20%; /* This would be dynamically set based on days left */
        }

        /* Tools Grid */
        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .tool-card {
            background-color: var(--card-bg);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px var(--shadow-color);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .tool-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px var(--shadow-hover);
        }

        .tool-image {
            height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding: 0.75rem;
        }

        .tool-image img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .tool-content {
            padding: 1rem;
            display: flex;
            flex-direction: column;
        }

        .access-button {
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 0.6rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            text-decoration: none;
            display: block;
            font-size: 0.9rem;
        }

        .access-button:hover {
            background-color: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
        }

        /* Mobile Menu Controls */
        .mobile-menu-toggle {
            display: none;
            background: var(--card-bg);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 5px var(--shadow-color);
            position: fixed;
            top: 1rem;
            left: 1rem;
            z-index: 99;
        }

        .mobile-menu-toggle i {
            color: var(--primary);
            font-size: 1.25rem;
        }

        /* Sidebar Toggle Button - Now moved inside the sidebar */
        .sidebar-toggle {
            background-color: var(--primary);
            color: white;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
        }

        .sidebar-toggle:hover {
            background-color: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(255, 107, 107, 0.4);
        }

        /* Mobile Nav Overlay */
        .mobile-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 99;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .mobile-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Responsive Styles */
        @media (max-width: 1200px) {
            .tools-grid {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            }
        }

        @media (max-width: 992px) {
            .stats-section {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 768px) {
            .sidebar {
                position: fixed;
                left: -300px;
                width: 280px;
                height: 100%;
                z-index: 1000;
                top: 0;
            }
            
            .sidebar.active {
                left: 0;
            }
            
            .sidebar.expanded {
                width: 280px;
            }
            
            .sidebar.expanded ~ .main-content {
                margin-left: 0;
            }
            
            .main-content {
                margin-left: 0;
                padding: 1rem;
                padding-top: 3.5rem; /* Add padding to accommodate the fixed menu toggle */
            }
            
            .mobile-menu-toggle {
                display: flex;
            }
            
            .search-container {
                max-width: 100%;
                margin: 0;
            }
            
            .topbar {
                flex-direction: column;
                align-items: stretch;
            }
            
            .topbar-actions {
                justify-content: flex-end;
                width: 100%;
            }
            
            .welcome-title {
                width: 100%;
            }
            
            .stats-section {
                grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
                gap: 1rem;
            }
            
            /* Show mobile menu actions section */
            .mobile-menu-actions {
                display: block;
            }
            
            /* Hide sidebar toggle in mobile mode */
            .sidebar-toggle-container {
                display: none;
            }
            
            /* Show mobile close button */
            .mobile-menu-close {
                display: flex;
            }
            
            /* Hide topbar buttons on mobile */
            .topbar .action-icon.theme,
            .topbar .action-icon.notification,
            .topbar .upgrade-button {
                display: none;
            }
        }

        @media (max-width: 576px) {
            .welcome-title h1 {
                font-size: 1.5rem;
            }
            
            .main-content {
                padding: 0.75rem;
                padding-top: 3.5rem; /* Keep consistent padding for menu toggle */
            }
            
            .tool-image {
                height: 70px;
            }
            
            .tool-name {
                font-size: 0.9rem;
            }
            
            .access-button {
                font-size: 0.85rem;
                padding: 0.5rem;
            }
            
            .upgrade-button {
                padding: 0.5rem 1rem;
                font-size: 0.9rem;
            }
            
            .tools-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.75rem;
            }
        }

        @media (max-width: 400px) {
            .topbar-actions {
                flex-wrap: wrap;
                justify-content: space-between;
                gap: 0.5rem;
            }
            
            .welcome-title p {
                font-size: 0.85rem;
            }
            
            .category-tabs {
                gap: 0.25rem;
            }
            
            .category-tab {
                padding: 0.5rem 1rem;
                font-size: 0.85rem;
            }
        }

        h2#member-main-subscriptions-head {
            display: none !important;
        }
        /* Complete Receipt Table CSS - Fixed Responsive Design */

/* Table Responsive Container - Single Container Fix */
.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  background: #ffffff;
}

/* Clean Receipt Table */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

.table-striped {
  /* Clean striped design */
}

.table-rounded {
  /* Handled by .table-responsive */
}

.border {
  /* Handled by .table-responsive */
}

.border-gray-300 {
  /* Handled by .table-responsive */
}

.table-row-bordered {
  /* Clean design without additional borders */
}

.table-row-gray-300 {
  /* Clean design without additional borders */
}

.gy-7,
.gs-7 {
  /* Handled by padding, no additional gap needed */
}

/* Table Container */
.table-container {
  position: relative;
  width: 100%;
  margin-bottom: 0;
}

.table-container::after {
  content: '';
  display: table;
  clear: both;
}

/* Table Header - Clean and Simple */
.table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e5e7eb;
}

.table thead th {
  padding: 12px 16px;
  font-weight: 600;
  color: #64748b;
  text-align: left;
  border-right: 1px solid #f1f5f9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: none;
  font-family: inherit;
}

.table thead th:last-child {
  border-right: none;
  text-align: right;
}

.table thead th:first-child {
  border-top-left-radius: 11px;
}

.table thead th:last-child {
  border-top-right-radius: 11px;
}

.text-gray-900 {
  color: #1f2937;
  font-family: inherit;
}

/* Table Body - Clean Rows with Subtle Lines */
.table tbody {
  background: transparent;
}

.table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.table tbody tr:hover {
  background: #f9fafb;
}

.table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.table tbody tr:nth-child(even):hover {
  background: #f1f5f9;
}

.table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  color: #374151;
  border-right: 1px solid #f1f5f9;
  border-bottom: none;
  font-family: inherit;
  font-size: 14px;
}

.table tbody td:last-child {
  border-right: none;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 11px;
}

.table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 11px;
}

/* Product Column */
.am-receipt-product {
  font-weight: 500;
  color: #1f2937;
  min-width: 200px;
  font-family: inherit;
}

.am-receipt-product-options {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
  font-family: inherit;
}

/* Quantity Column - Center Aligned */
.am-receipt-qty {
  text-align: center;
  font-weight: 500;
  width: 60px;
  color: #374151;
  font-family: inherit;
}

/* Price Columns - Right Aligned with Consistent Font */
.am-receipt-unit-price,
.am-receipt-price {
  text-align: right;
  font-weight: 600;
  color: #1f2937;
  font-family: inherit;
  min-width: 120px;
  white-space: nowrap;
}

/* Delimiter Row - Subtle Spacing */
.am-receipt-row-delimiter {
  height: 8px;
  background: transparent;
}

.am-receipt-row-delimiter td {
  padding: 4px 0;
  border: none;
  background: transparent;
}

/* Indent for totals */
.am-receipt-indent {
  width: 40px;
  border: none;
  padding: 12px 0;
}

/* Total Rows - Enhanced Design */
.am-receipt-total {
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  font-family: inherit;
}

/* Subtotal Row - Light Design */
.bg-light-danger {
  background: #fef2f2;
  border-left: 3px solid #f87171;
}

.bg-light-danger .am-receipt-total {
  color: #dc2626;
}

/* Discount Row */
.am-receipt-row-discount {
  background: #fef2f2;
  border-left: 3px solid #f87171;
}

.am-receipt-row-discount .am-receipt-total {
  color: #dc2626;
}

/* Total Row - Prominent Design */
.am-receipt-row-total {
  background: #f0fdf4;
  border-left: 3px solid #10b981;
}

.am-receipt-row-total td {
  background: #f0fdf4;
  font-weight: 700;
}

.bg-light-success {
  background: #f0fdf4;
  border-left: 3px solid #10b981;
}

.bg-light-success.am-receipt-total {
  color: #059669;
  font-size: 15px;
  font-weight: 700;
}

/* Terms Row - Clean Footer */
.am-receipt-row-terms {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.am-receipt-terms {
  padding: 16px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  text-align: center;
  background: #f8fafc;
  font-family: inherit;
}

.am-receipt-terms strong {
  color: #374151;
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}

.am-receipt-terms-one-time {
  /* Specific styling for one-time terms */
}

/* Discounted Price Styling */
.am-receipt-discounted-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  display: block;
  margin-bottom: 2px;
}

/* Payment Button Container - Right Aligned */
.payment-button-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  width: 100%;
  padding: 0;
}

.payment-section {
  text-align: right;
  margin-top: 20px;
  width: 100%;
  padding: 0;
}

/* Pay Now Button - Prominent CTA */
.razorpay-payment-button {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
  min-width: 120px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  margin-left: auto;
  display: block;
}

.payment-button-container .razorpay-payment-button {
  margin-top: 0;
  margin-left: 0;
}

.payment-section .razorpay-payment-button {
  margin-top: 0;
  margin-left: auto;
  display: inline-block;
}

.razorpay-payment-button:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35);
}

.razorpay-payment-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
}

.razorpay-payment-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

/* Add payment icon */
.razorpay-payment-button::before {
  content: '🔒';
  margin-right: 6px;
  font-size: 12px;
}

/* Loading state for payment button */
.razorpay-payment-button.loading {
  background: #9ca3af;
  cursor: not-allowed;
  pointer-events: none;
}

.razorpay-payment-button.loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 6px;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fix for table layout - Proper Column Alignment */
.table {
  table-layout: fixed;
  width: 100%;
}

/* Column width distribution to match screenshot */
.table th:nth-child(1), 
.table td:nth-child(1) { 
  width: 45%; 
  text-align: left;
}

.table th:nth-child(2), 
.table td:nth-child(2) { 
  width: 10%; 
  text-align: center;
}

.table th:nth-child(3), 
.table td:nth-child(3) { 
  width: 20%; 
  text-align: right;
}

.table th:nth-child(4), 
.table td:nth-child(4) { 
  width: 25%; 
  text-align: right;
}

/* Ensure total rows span correctly and align properly */
.am-receipt-total[colspan="2"] {
  text-align: left;
  padding-left: 20px;
}

/* Fix subtotal and total row alignment */
.am-receipt-row-total td:nth-child(2),
.bg-light-danger td:nth-child(2),
.bg-light-success td:nth-child(2) {
  text-align: left;
  font-weight: 700;
}

.am-receipt-row-total td:nth-child(3),
.bg-light-danger td:nth-child(3),
.bg-light-success td:nth-child(3) {
  text-align: right;
  font-weight: 700;
}

/* Responsive Design - Mobile First */
@media (max-width: 480px) {
  .table-responsive {
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  
  .table {
    font-size: 12px;
    table-layout: auto;
  }
  
  .table thead th {
    padding: 8px 6px;
    font-size: 10px;
  }
  
  .table tbody td {
    padding: 10px 6px;
    font-size: 12px;
  }
  
  .table th:nth-child(1), 
  .table td:nth-child(1) { 
    width: 40%; 
  }
  
  .table th:nth-child(2), 
  .table td:nth-child(2) { 
    width: 15%; 
  }
  
  .table th:nth-child(3), 
  .table td:nth-child(3) { 
    width: 22%; 
  }
  
  .table th:nth-child(4), 
  .table td:nth-child(4) { 
    width: 23%; 
  }
  
  .am-receipt-terms {
    padding: 12px 8px;
    font-size: 11px;
  }
  
  .payment-button-container,
  .payment-section {
    justify-content: center;
    text-align: center;
    padding: 0;
    margin-top: 16px;
  }
  
  .payment-button-container .razorpay-payment-button,
  .payment-section .razorpay-payment-button,
  .razorpay-payment-button {
    width: 100%;
    margin: 0;
    padding: 12px 20px;
    font-size: 14px;
    display: block;
    text-align: center;
  }
  
  .am-receipt-discounted-price {
    font-size: 10px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .table {
    font-size: 13px;
  }
  
  .table thead th {
    padding: 10px 12px;
    font-size: 11px;
  }
  
  .table tbody td {
    padding: 12px;
    font-size: 13px;
  }
  
  .table th:nth-child(1), 
  .table td:nth-child(1) { 
    width: 42%; 
  }
  
  .table th:nth-child(2), 
  .table td:nth-child(2) { 
    width: 12%; 
  }
  
  .table th:nth-child(3), 
  .table td:nth-child(3) { 
    width: 23%; 
  }
  
  .table th:nth-child(4), 
  .table td:nth-child(4) { 
    width: 23%; 
  }
  
  .am-receipt-terms {
    padding: 14px;
    font-size: 12px;
  }
  
  .payment-button-container,
  .payment-section {
    justify-content: flex-end;
    text-align: right;
    margin-top: 18px;
  }
  
  .razorpay-payment-button {
    width: auto;
    min-width: 140px;
  }
}

@media (min-width: 769px) {
  .table thead th {
    padding: 12px 16px;
  }
  
  .table tbody td {
    padding: 14px 16px;
  }
  
  .payment-button-container,
  .payment-section {
    justify-content: flex-end;
    text-align: right;
    margin-top: 20px;
  }
}

/* Dark Mode Styles */
[data-theme="dark"] .table-responsive {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .table {
  background: transparent;
  color: #e2e8f0;
}

[data-theme="dark"] .table thead {
  background: #334155;
  border-bottom-color: #475569;
}

[data-theme="dark"] .table thead th {
  color: #94a3b8;
  border-right-color: #475569;
}

[data-theme="dark"] .text-gray-900 {
  color: #f1f5f9;
}

[data-theme="dark"] .table tbody tr {
  border-bottom-color: #334155;
}

[data-theme="dark"] .table tbody tr:hover {
  background: #334155;
}

[data-theme="dark"] .table tbody tr:nth-child(even) {
  background: #2d3748;
}

[data-theme="dark"] .table tbody tr:nth-child(even):hover {
  background: #334155;
}

[data-theme="dark"] .table tbody td {
  color: #cbd5e1;
  border-right-color: #334155;
}

[data-theme="dark"] .am-receipt-product {
  color: #f1f5f9;
}

[data-theme="dark"] .am-receipt-product-options {
  color: #94a3b8;
}

[data-theme="dark"] .am-receipt-qty {
  color: #cbd5e1;
}

[data-theme="dark"] .am-receipt-unit-price,
[data-theme="dark"] .am-receipt-price {
  color: #e2e8f0;
}

[data-theme="dark"] .am-receipt-total {
  color: #f1f5f9;
}

[data-theme="dark"] .bg-light-danger {
  background: #7f1d1d;
  border-left-color: #ef4444;
}

[data-theme="dark"] .bg-light-danger .am-receipt-total {
  color: #fca5a5;
}

[data-theme="dark"] .am-receipt-row-total,
[data-theme="dark"] .am-receipt-row-total td,
[data-theme="dark"] .bg-light-success {
  background: #14532d;
  border-left-color: #10b981;
}

[data-theme="dark"] .bg-light-success.am-receipt-total {
  color: #86efac;
}

[data-theme="dark"] .am-receipt-row-terms {
  background: #334155;
  border-top-color: #475569;
}

[data-theme="dark"] .am-receipt-terms {
  color: #94a3b8;
  background: #334155;
}

[data-theme="dark"] .am-receipt-terms strong {
  color: #f1f5f9;
}

[data-theme="dark"] .am-receipt-discounted-price {
  color: #64748b;
}

/* Dark mode button */
[data-theme="dark"] .razorpay-payment-button {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .razorpay-payment-button:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Print Styles */
@media print {
  .table-responsive {
    border: 1px solid #000;
    box-shadow: none;
  }
  
  .table thead th {
    background: #f5f5f5;
    color: #000;
    border-bottom: 1px solid #000;
    border-right: 1px solid #ccc;
  }
  
  .table tbody td {
    color: #000;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #ccc;
  }
  
  .bg-light-danger,
  .bg-light-success {
    background: #f9f9f9 !important;
    border-left: 3px solid #000 !important;
  }
  
  .razorpay-payment-button {
    background: #000;
    color: #fff;
    box-shadow: none;
  }
  
  
  .payment-button-container,
  .payment-section {
    page-break-inside: avoid;
  }
  
}