 :root {
            /* Light Theme */
            --primary: #ff6b6b;
            --primary-hover: #ff5252;
            --primary-light: rgba(255, 107, 107, 0.1);
            --background: #f9fafb;
            --card-bg: #ffffff;
            --sidebar-bg: #000000;
            --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 {
            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;
            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;
        }
        .main-content {
    background-color: white;
    border-radius: 16px;
    margin: 15px;
}
body {
    background-color: #000000;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

        /* 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;
            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;
            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;
        }
      /* Profile Form Styling - Matches Dashboard UI */
.am-form {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.am-form:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.am-profile-form {
    max-width: 800px;
    margin: 0 auto;
}

/* Row styling */
.am-row {
    margin-bottom: 1.5rem;
    position: relative;
}

.am-row:last-child {
    margin-bottom: 0;
}

/* Element title styling */
.am-element-title {
    margin-bottom: 0.75rem;
}

.am-element-title label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    position: relative;
}

.am-element-title .required {
    color: var(--primary);
    font-weight: 700;
}

.am-element-title .comment {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-style: italic;
    line-height: 1.4;
}

/* Input field styling */
.am-element input[type="text"],
.am-element input[type="password"],
.am-element input[type="email"],
.am-element select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.am-element input[type="text"]:focus,
.am-element input[type="password"]:focus,
.am-element input[type="email"]:focus,
.am-element select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: translateY(-2px);
    background-color: var(--card-bg);
}

.am-element input[type="text"]:hover,
.am-element input[type="password"]:hover,
.am-element input[type="email"]:hover,
.am-element select:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Placeholder styling */
.am-element input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Group element styling (for name fields) */
.am-element.group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.am-element.group input,
.am-element.group select {
    width: 100%;
}

/* Wide element styling */
.am-el-wide {
    width: 100% !important;
}

/* Select dropdown styling */
.am-element select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
    cursor: pointer;
}

.am-element select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Dark theme support for select dropdown */
[data-theme="dark"] .am-element select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

[data-theme="dark"] .am-element select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* State group styling */
#row-grp-state .am-element.group {
    display: block;
}

#row-grp-state .am-element.group select,
#row-grp-state .am-element.group input {
    width: 100%;
    margin-bottom: 0;
}

#row-grp-state select[disabled],
#row-grp-state input[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--hover-bg);
}

/* Fieldset styling (Address Information) */
fieldset {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background-color: rgba(255, 107, 107, 0.02);
    transition: all 0.3s ease;
}

[data-theme="dark"] fieldset {
    background-color: rgba(255, 107, 107, 0.05);
}

fieldset:hover {
    border-color: var(--primary);
    background-color: rgba(255, 107, 107, 0.05);
}

fieldset legend {
    background-color: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-left: 1rem;
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2);
}

.fieldset {
    margin: 0;
}

/* Change password toggle link */
.am-change-pass-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.am-change-pass-toggle:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
    text-decoration: none;
}

.am-change-pass-toggle::before {
    content: 'Password';
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Password fields - smooth transitions */
#row-_oldpass-0,
#row-pass-0,
#row-pass-confirm {
    transition: all 0.4s ease;
    overflow: hidden;
}

/* Hide password fields initially if they have display:none */
#row-_oldpass-0[style*="display: none"],
#row-pass-0[style*="display: none"],
#row-pass-confirm[style*="display: none"] {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    transform: translateY(-10px);
}

/* Show password fields when visible */
#row-_oldpass-0[style=""],
#row-pass-0[style=""],
#row-pass-confirm[style=""] {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 1.5rem;
    transform: translateY(0);
    animation: slideDownFade 0.4s ease-out;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Password fields styling */
.am-change-pass {
    transition: all 0.3s ease;
}

/* Submit button styling */
.am-cta-profile {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    margin: 0 auto;
    display: block;
}

.am-cta-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.am-cta-profile:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.4);
}

.am-cta-profile:hover::before {
    left: 100%;
}

.am-cta-profile:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

.am-cta-profile:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-light), 0 8px 16px rgba(255, 107, 107, 0.3);
}

/* Hidden fields */
input[type="hidden"] {
    display: none;
}

/* Form validation states */
.am-element input.error,
.am-element select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.am-element input.success,
.am-element select.success {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Loading state for submit button */
.am-cta-profile.loading {
    pointer-events: none;
    opacity: 0.7;
}

.am-cta-profile.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.am-error {
    color: #ff0000;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}



/* Responsive design */
@media (max-width: 768px) {
    .am-form {
        padding: 1.5rem;
        margin: 1rem 0;
        border-radius: 12px;
    }
    
    .am-element.group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    fieldset {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    fieldset legend {
        margin-left: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .am-element input[type="text"],
    .am-element input[type="password"],
    .am-element input[type="email"],
    .am-element select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .am-cta-profile {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        max-width: none;
        width: 100%;
    }
    
    .am-element-title label {
        font-size: 0.9rem;
    }
    
    .am-element-title .comment {
        font-size: 0.75rem;
    }
    
    .am-change-pass-toggle {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .am-form {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .am-row {
        margin-bottom: 1.25rem;
    }
    
    fieldset {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .am-element input[type="text"],
    .am-element input[type="password"],
    .am-element input[type="email"],
    .am-element select {
        padding: 0.625rem;
        border-radius: 8px;
    }
}

/* Dark theme adjustments */
[data-theme="dark"] .am-form {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .am-form:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
/* Enhanced Subscription Section Styling with Dark Mode Support */

/* Main subscription block */
#am-block-active-subscriptions {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

#am-block-active-subscriptions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#am-block-active-subscriptions h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

#am-block-active-subscriptions h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Enhanced Invoice Cards */
.am-active-invoice {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary) !important;
}

.am-active-invoice:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-left-width: 6px !important;
}

/* Enhanced Header Layout */
.am-active-invoice-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
    width: 100%;
}

/* Enhanced Badge Styling */
.am-active-invoice-date {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .am-active-invoice-date {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.am-active-invoice-num {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    transition: all 0.2s ease;
}

[data-theme="dark"] .am-active-invoice-num {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.am-active-invoice-paysys {
    background: rgba(139, 92, 246, 0.1) !important;
    color: #8b5cf6 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .am-active-invoice-paysys {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #c4b5fd !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.am-active-invoice-terms {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .am-active-invoice-terms {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

/* Badge hover effects */
.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Enhanced Product List */
.am-active-invoice-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.am-active-invoice-product {
    margin-bottom: 0.75rem;
}

.am-active-invoice-item-title {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #22c55e !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

[data-theme="dark"] .am-active-invoice-item-title {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.am-active-invoice-item-title::before {
    content: '✓';
    margin-right: 0.5rem;
    color: inherit;
    font-weight: bold;
}

.am-active-invoice-item-title:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

/* Enhanced Payments History Section */
#am-block-payments {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

#am-block-payments::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
}

#am-block-payments h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

#am-block-payments h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

/* Enhanced Table Styling */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.table {
    margin-bottom: 0 !important;
    background: var(--card-bg);
    color: var(--text-primary);
}

.table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-secondary);
    vertical-align: middle;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.am-member-payment-history-row.even td {
    background: var(--hover-bg);
}

.am-member-payment-history-row.odd td {
    background: var(--card-bg);
}

.am-member-payment-history-row:hover td {
    background: var(--primary-light);
    transform: translateX(4px);
}

.am-member-payment-history-row td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Enhanced Invoice Links */
.am-member-payment-history-row a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.am-member-payment-history-row a:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Cancel Subscription Popup Enhancement */
.cancel-subscription-popup {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px var(--shadow-hover);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.cancel-subscription-popup-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.cancel-subscription-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.am-cta-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.am-cta-cancel:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .am-cta-cancel {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.am-popup-close {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.am-popup-close:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

[data-theme="dark"] .am-popup-close {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    #am-block-active-subscriptions,
    #am-block-payments {
        padding: 1.5rem;
        margin: 1rem 0;
        border-radius: 12px;
    }

    .am-active-invoice {
        padding: 1.25rem !important;
        border-radius: 8px;
    }

    .am-active-invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .table-responsive {
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }

    .cancel-subscription-buttons {
        flex-direction: column;
    }

    #am-block-active-subscriptions h2,
    #am-block-payments h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    #am-block-active-subscriptions,
    #am-block-payments {
        padding: 1rem;
    }

    .am-active-invoice {
        padding: 1rem !important;
    }

    .am-active-invoice-header {
        gap: 0.5rem;
    }

    .badge {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.75rem !important;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
}

/* Add subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.am-active-invoice {
    animation: fadeInUp 0.5s ease-out;
}

.am-active-invoice:nth-child(2) {
    animation-delay: 0.1s;
}

.am-active-invoice:nth-child(3) {
    animation-delay: 0.2s;
}

.am-active-invoice:nth-child(4) {
    animation-delay: 0.3s;
}

/* Enhanced focus states for accessibility */
.badge:focus,
.am-cta-cancel:focus,
.am-popup-close:focus,
.am-member-payment-history-row a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading state for better UX */
.loading-shimmer {
    background: linear-gradient(90deg, var(--hover-bg) 25%, var(--border-color) 50%, var(--hover-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
[data-theme="dark"] #no-plan-alert {
    background: #2b2b2b !important;
    border: 1px solid #555 !important;
    color: #f5f5f5 !important;
}

[data-theme="dark"] #no-plan-alert a.button-primary {
    background-color: #ff6b6b !important;
    color: #ffffff !important;
}
/* Apply same styling to input submit button */
input[type="submit"]#_save-0 {
    all: unset;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
    font-family: inherit;
    margin: 0 auto;
    display: block;
    position: relative;
    text-align: center;
}

input[type="submit"]#_save-0:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.4);
}

input[type="submit"]#_save-0:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

input[type="submit"]#_save-0:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-light), 0 8px 16px rgba(255, 107, 107, 0.3);
}

/* Loading state for both buttons */
.am-element.loading,
input[type="submit"].loading {
    pointer-events: none;
    opacity: 0.7;
}

.am-element.loading::after,
input[type="submit"].loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error text */
.am-error {
    color: #ff0000;
}
/* Dark mode variables */
:root {
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #777777;
  --border-color: #dee2e6;
  --info-bg: #f8f9fa;
  --hover-bg: #f3f4f6;
  --shadow-color: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --border-color: #2c2c2c;
  --info-bg: #252525;
  --hover-bg: #2a2a2a;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

/* Container */
.helpdesk-page.container-xxl {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Info banner */
.am-info {
  background: var(--info-bg);
  padding: 10px 15px;
  border-left: 3px solid #007bff;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Grid wrapper */
.am-grid-wrap {
  background: var(--card-bg);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: background-color 0.3s ease;
}

/* Title */
.am-grid-title {
  font-size: 24px;
  margin: 10px 10px 10px 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.am-grid-title-desc {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: normal;
}

/* Filter */
.am-filter-wrap {
  padding: 15px;
  background: var(--info-bg);
  border-bottom: 1px solid var(--border-color);
}

.filter {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter input[type="text"] {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  width: 250px;
  background-color: var(--card-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.filter input[type="text"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter input[type="text"]::placeholder {
  color: var(--text-muted);
}

.gridFilterButton {
  padding: 8px 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.gridFilterButton:hover {
  background: #0056b3;
}

/* New ticket button */
.am-norecord-actions {
  padding: 15px;
  text-align: right;
  background: var(--card-bg);
}

.button {
  background: #28a745;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background: #218838;
  color: white;
  text-decoration: none;
}

/* Table */
.am-grid-container {
  overflow-x: auto;
  background: var(--card-bg);
}

.am-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card-bg);
}

.am-grid th {
  background: var(--info-bg);
  padding: 12px 8px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
}

.am-grid th a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.am-grid th a:hover {
  color: #007bff;
}

.am-grid td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-secondary);
  background: var(--card-bg);
  transition: background-color 0.3s ease;
}

.am-grid-row.even td {
  background: var(--hover-bg);
}

.am-grid-row:hover td {
  background: var(--hover-bg);
}

.am-grid-row.disabled {
  opacity: 0.6;
}

/* Subject column */
.am-helpdesk-grid-subject .link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.am-helpdesk-grid-subject .link:hover {
  color: #0056b3;
}

.am-helpdesk-grid-msg-cnt {
  background: #6c757d;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 5px;
}

.am-helpdesk-grid-msg {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 5px;
}

/* Time */
time {
  color: var(--text-muted);
  font-size: 13px;
}

/* Status icons with colors */
.glyph {
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Status color mapping based on title attribute */
.glyph[title="New"],
.glyph[alt="New"] {
  background-color: #007bff;
}

.glyph[title="Awaiting Admin Response"],
.glyph[alt="Awaiting Admin Response"] {
  background-color: #dc3545;
}

.glyph[title="Awaiting User Response"],
.glyph[alt="Awaiting User Response"] {
  background-color: #ffc107;
}

.glyph[title="Closed"],
.glyph[alt="Closed"] {
  background-color: #28a745;
}

.am-grid-row:hover .glyph {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dark mode adjustments */
[data-theme="dark"] .am-helpdesk-grid-msg-cnt {
  background: #495057;
}

[data-theme="dark"] .am-helpdesk-grid-subject .link {
  color: #4dabf7;
}

[data-theme="dark"] .am-helpdesk-grid-subject .link:hover {
  color: #74c0fc;
}

/* Status Legend */
.status-legend {
  margin-top: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.status-legend h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.new {
  background-color: #007bff;
}

.legend-dot.pending {
  background-color: #dc3545;
}

.legend-dot.awaiting {
  background-color: #ffc107;
}

.legend-dot.closed {
  background-color: #28a745;
}
/* Add Attachments Link */
.am-helpdesk-attachment-expand {
  display: none;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--info-bg);
  color: #007bff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.am-helpdesk-attachment-expand:hover {
  background: #007bff;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.am-helpdesk-attachment-expand:before {
  content: '📎';
  margin-right: 0.5rem;
  font-size: 12px;
}

/* Upload Control - Hidden by default */
.upload-control {
  margin-top: 0.75rem;
  display: none;
}

/* When attachment row is shown, display upload control */
.am-row[id*="attachments"]:not([style*="display: none"]) .upload-control {
  display: block;
}

.upload-control-upload {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.upload-control-upload:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.upload-control-upload span {
  color: white;
  font-size: 14px;
  font-weight: 600;
}

/* Remove the upload icon */
.upload-control-upload:before {
  display: none;
}

/* Submit Button */
input[type="submit"] {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  
}

input[type="submit"]:hover {
  background: #ff6b6b;
  transform: translateY(-2px);
 
}

input[type="submit"]:active {
  transform: translateY(0);
  
}

/* Hidden Elements */
input[type="text"][style*="display: none"],
input[type="text"][style*="opacity: 0"] {
  display: none !important;
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .am-helpdesk-attachment-expand {
  color: #4dabf7;
}

[data-theme="dark"] .am-helpdesk-attachment-expand:hover {
  background: #4dabf7;
  color: white;
}

[data-theme="dark"] .upload-control-upload {
  background: #4dabf7;
}

[data-theme="dark"] .upload-control-upload:hover {
  background: #339af0;
}

/* Responsive */
@media (max-width: 768px) {
  .upload-control-upload {
    padding: 0.75rem 1.25rem;
  }
  
  input[type="submit"] {
    width: 100%;
    padding: 0.875rem;
  }
}
/* Success Message Container */
.container-xxl h1 {
  color: #28a745;
  font-size: 1.75rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
  text-align: center;
}

.container-xxl h1:before {
  content: '✅';
  margin-right: 0.5rem;
  font-size: 1.5rem;
}

/* Success Message Text */
.container-xxl p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: center;
}

.container-xxl p:first-of-type {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Reference Number Link */
.container-xxl p:last-of-type {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.container-xxl .link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.container-xxl .link:hover {
  background: #007bff;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .container-xxl h1 {
  color: #51cf66;
}

[data-theme="dark"] .container-xxl .link {
  color: #4dabf7;
  background: rgba(77, 171, 247, 0.15);
}

[data-theme="dark"] .container-xxl .link:hover {
  background: #4dabf7;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .container-xxl h1 {
    font-size: 1.5rem;
  }
  
  .container-xxl p {
    font-size: 0.95rem;
  }
  
  .container-xxl p:last-of-type {
    padding: 0.75rem;
  }
}
/* Ticket Container */
.am-helpdesk {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow-color);
  overflow: hidden;
}

/* Ticket Header */
.am-helpdesk-ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--info-bg);
  border-bottom: 1px solid var(--border-color);
}

.am-helpdesk-ticket-info {
  color: var(--text-secondary);
  font-size: 14px;
}

.am-helpdesk-ticket-info strong {
  color: var(--text-primary);
}

/* Actions Container */
.am-helpdesk-ticket-actions-container {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.am-helpdesk-ticket-actions {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.am-helpdesk-ticket-action a {
  padding: 0.5rem 1rem;
  background: var(--info-bg);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.am-helpdesk-ticket-action a:hover {
  background: #007bff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

/* Message Container */
.am-helpdesk-message {
  border-bottom: 1px solid var(--border-color);
}

.am-helpdesk-message:last-child {
  border-bottom: none;
}

/* Message Header */
.am-helpdesk-message-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--info-bg);
  font-size: 14px;
  color: var(--text-secondary);
}

.am-helpdesk-message-action-fold a {
  background: var(--text-muted);
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  margin-right: 1rem;
}

.am-helpdesk-message-has-attachments img {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
}

.am-helpdesk-message-author {
  font-weight: 600;
  color: var(--text-primary);
}

.am-helpdesk-message-date {
  color: var(--text-muted);
  font-size: 13px;
}

.am-helpdesk-message-preview {
  color: var(--text-muted);
  font-style: italic;
}

/* Message Content */
.am-helpdesk-message-content {
  padding: 1.5rem;
}

.am-helpdesk-message-content pre {
  background: var(--info-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-family: inherit;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}

.am-helpdesk-message-content img {
  border-radius: 8px;
  margin: 0.5rem 0;
  box-shadow: 0 2px 8px var(--shadow-color);
}

/* Attachments */
.am-helpdesk-message-attachments {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.am-helpdesk-message-attachments-item {
  background: var(--info-bg);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.am-helpdesk-message-attachments-item a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.am-helpdesk-message-attachments-item a:hover {
  color: #0056b3;
}

/* Reply Panel */
.am-helpdesk-reply-panel {
  padding: 1rem 1.5rem;
  background: var(--hover-bg);
  border-top: 1px solid var(--border-color);
}

.am-helpdesk-reply-panel-tools {
  margin-bottom: 1rem;
}

.am-helpdesk-reply-panel-tool-emoji {
  display: flex;
  gap: 0.5rem;
}

.am-helpdesk-reply-panel-tool-emoji-item {
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.am-helpdesk-reply-panel-tool-emoji-item:hover {
  background: var(--card-bg);
  transform: scale(1.1);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .am-helpdesk-ticket-action a:hover {
  background: #4dabf7;
  color: white;
}

[data-theme="dark"] .am-helpdesk-message-attachments-item a {
  color: #4dabf7;
}

[data-theme="dark"] .am-helpdesk-message-attachments-item a:hover {
  color: #74c0fc;
}

/* Responsive */
@media (max-width: 768px) {
  .am-helpdesk {
    margin: 0 1rem;
    border-radius: 8px;
  }
  
  .am-helpdesk-ticket-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .am-helpdesk-ticket-header,
  .am-helpdesk-message-header,
  .am-helpdesk-message-content,
  .am-helpdesk-reply-panel {
    padding: 1rem;
  }
  
  .am-helpdesk-reply-panel-tool-emoji {
    flex-wrap: wrap;
  }
}


/* Affiliate Banner Preview Container */
.am-aff-banner-preview {
  background: var(--card-bg);
  
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: all 0.3s ease;
}

.am-aff-banner-preview:hover {
  border-color: #007bff;
  box-shadow: 0 4px 12px var(--shadow-hover);
}

/* Copy to Clipboard Text */
.am-copy-to-clipboard {
  flex: 1;
  background: var(--info-bg);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  word-break: break-all;
  user-select: all;
  cursor: text;
}

/* Copy Button */
.am-copy-to-clipboard-trigger {
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.am-copy-to-clipboard-trigger:hover {
  background: #ff6b6b;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.am-copy-to-clipboard-trigger:before {
  content: '📋';
  margin-right: 0.5rem;
}

.am-copy-to-clipboard-trigger:after {
  content: 'Copy';
}

/* Success state after copying */
.am-copy-to-clipboard-trigger.copied {
  background: #28a745;
  color: white;
}

.am-copy-to-clipboard-trigger.copied:before {
  content: '✅';
}

.am-copy-to-clipboard-trigger.copied:after {
  content: 'Copied!';
}

/* Dark Mode Adjustments */
[data-theme="dark"] .am-copy-to-clipboard-trigger {
  background: #4dabf7;
}

[data-theme="dark"] .am-copy-to-clipboard-trigger:hover {
  background: #339af0;
}

[data-theme="dark"] .am-copy-to-clipboard-trigger.copied {
  background: #51cf66;
}

/* Responsive */
@media (max-width: 768px) {
  .am-aff-banner-preview {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .am-copy-to-clipboard {
    font-size: 13px;
    padding: 0.6rem 0.8rem;
  }
  
  .am-copy-to-clipboard-trigger {
    width: 100%;
  }
  
  .container-xxl h2 {
    font-size: 1.25rem;
  }
}
/* Affiliate Stats Table Container */
.am-grid-container {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-color);
  margin: 1.5rem 0;
}

/* Table Styling */
.am-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card-bg);
}

/* Table Header */
.am-grid th {
  background: var(--info-bg);
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.am-grid th[style*="text-align:right"] {
  text-align: right;
}

/* Table Rows */
.am-grid-row td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--card-bg);
  transition: background-color 0.3s ease;
}

.am-grid-row:hover td {
  background: var(--hover-bg);
}

/* Right aligned cells */
.am-grid-row td[style*="text-align:right"] {
  text-align: right;
  font-weight: 500;
}

/* Commission amount styling */
.am-grid-row td:nth-child(2) {
  color: #28a745;
  font-weight: 600;
}

/* Total row styling */
.am-grid-row[style*="font-weight: bold"] td {
  background: var(--info-bg);
  font-weight: 700;
  color: var(--text-primary);
  border-top: 2px solid var(--border-color);
  border-bottom: none;
}

.am-grid-row[style*="font-weight: bold"] td:nth-child(2) {
  color: #007bff;
  font-size: 1.1em;
}

/* Detail row (expandable) */
.am-grid-row[id*="detail-"] td {
  background: var(--hover-bg);
  padding: 1.5rem;
}

.am-grid-row[id*="detail-"] .detail-close {
  background: #dc3545;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.am-grid-row[id*="detail-"] .detail-close:hover {
  background: #c82333;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* Empty state styling */
.am-grid-row td:contains("–") {
  color: var(--text-muted);
  font-style: italic;
}

/* Zero amount styling */
.am-grid-row td:contains("0.00") {
  color: var(--text-muted);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .am-grid-row[style*="font-weight: bold"] td:nth-child(2) {
  color: #4dabf7;
}

[data-theme="dark"] .am-grid-row td:nth-child(2) {
  color: #51cf66;
}

[data-theme="dark"] .am-grid-row[id*="detail-"] .detail-close {
  background: #fa5252;
}

[data-theme="dark"] .am-grid-row[id*="detail-"] .detail-close:hover {
  background: #e03131;
}

/* Responsive */
@media (max-width: 768px) {
  .am-grid th,
  .am-grid-row td {
    padding: 0.75rem 0.5rem;
    font-size: 13px;
  }
  
  .am-grid th:first-child,
  .am-grid-row td:first-child {
    padding-left: 1rem;
  }
  
  .am-grid th:last-child,
  .am-grid-row td:last-child {
    padding-right: 1rem;
  }
}

@media (max-width: 576px) {
  .am-grid-container {
    margin: 1rem 0;
    border-radius: 8px;
  }
  
  .am-grid th,
  .am-grid-row td {
    padding: 0.6rem 0.4rem;
    font-size: 12px;
  }
}
/* Chart Container */
div[id*="report-"] {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all 0.3s ease;
}

div[id*="report-"]:hover {
  box-shadow: 0 6px 16px var(--shadow-hover);
  transform: translateY(-2px);
}



/* Chart Text Elements */
div[id*="report-"] svg text {
  fill: var(--text-muted) !important;
  font-family: inherit !important;
  font-size: 12px !important;
}

/* Chart Grid Lines */
div[id*="report-"] svg path[stroke="#aaaaaa"] {
  stroke: var(--border-color) !important;
  stroke-width: 0.5 !important;
}

/* Chart Data Points */
div[id*="report-"] svg circle {
  stroke: var(--card-bg) !important;
  stroke-width: 2 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Morris Hover Tooltip */
.morris-hover {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 20px var(--shadow-hover) !important;
  padding: 0.75rem !important;
  font-family: inherit !important;
  font-size: 13px !important;
  z-index: 9999 !important;
  position: fixed !important;
}

.morris-hover.morris-default-style {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
}

/* Hover Row Label */
.morris-hover-row-label {
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  margin-bottom: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--border-color) !important;
  font-size: 14px !important;
}

/* Hover Point Data */
.morris-hover-point {
  color: var(--text-secondary) !important;
  margin: 0.25rem 0 !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.morris-hover-point:before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* Color-specific styling for different metrics */
.morris-hover-point[style*="#4da74d"]:before {
  background: #4da74d !important;
}

.morris-hover-point[style*="#21005d"]:before {
  background: #21005d !important;
}

.morris-hover-point[style*="#edc240"]:before {
  background: #edc240 !important;
}

.morris-hover-point[style*="#7A92A3"]:before,
.morris-hover-point[style*="#7a92a3"]:before {
  background: #7A92A3 !important;
}

/* Dark Mode Adjustments */
[data-theme="dark"] div[id*="report-"] svg text {
  fill: var(--text-muted) !important;
}

[data-theme="dark"] div[id*="report-"] svg path[stroke="#aaaaaa"] {
  stroke: var(--border-color) !important;
}

[data-theme="dark"] div[id*="report-"] svg circle {
  stroke: var(--card-bg) !important;
}

/* Chart Title (if added) */
div[id*="report-"]:before {
  content: attr(data-title);
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 16px;
  text-align: center;
}

/* Loading State */
div[id*="report-"].loading {
  background: var(--hover-bg);
  position: relative;
}

div[id*="report-"].loading:after {
  content: 'Loading chart...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  div[id*="report-"] {
    margin: 1rem 0;
    padding: 0.75rem;
    border-radius: 8px;
  }
  
  .morris-hover {
    font-size: 12px !important;
    padding: 0.5rem !important;
  }
  
  .morris-hover-row-label {
    font-size: 13px !important;
  }
  
  .morris-hover-point {
    font-size: 12px !important;
  }
}

@media (max-width: 576px) {
  div[id*="report-"] {
    height: 200px !important;
  }
  
  div[id*="report-"] svg {
    height: 200px !important;
  }
}
/* Export Stats Container */
.am-aff-stats-export {
  margin: 1.5rem 0;
  text-align: center;
}

/* Export Button */
.am-aff-stats-export-report {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  border: none;
  cursor: pointer;
}

.am-aff-stats-export-report:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.am-aff-stats-export-report:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Download Icon */
.am-aff-stats-export-report:before {
  content: '📊';
  font-size: 16px;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .am-aff-stats-export-report {
  background: #4dabf7;
  box-shadow: 0 2px 4px rgba(77, 171, 247, 0.3);
}

[data-theme="dark"] .am-aff-stats-export-report:hover {
  background: #339af0;
  box-shadow: 0 4px 8px rgba(77, 171, 247, 0.4);
}

[data-theme="dark"] .am-aff-stats-export-report:active {
  box-shadow: 0 2px 4px rgba(77, 171, 247, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .am-aff-stats-export {
    margin: 1rem 0;
  }
  
  .am-aff-stats-export-report {
    padding: 0.6rem 1.25rem;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .am-aff-stats-export-report {
    width: 100%;
    justify-content: center;
  }
}
/* No Data Block */
.am-block-nodata {
  background: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 16px;
  font-style: italic;
}

.am-block-nodata:before {
  content: '📊';
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* TICKET NOTIFY */

.am-info-helpdesk {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin: 10px 0;
}

.am-info-helpdesk a {
    color: #0b5138;
    text-decoration: underline;
    font-weight: 600;
}





/* Paragraphs */
.container-xxl p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.container-xxl p:last-of-type {
  margin-bottom: 0;
}

/* Keywords List */
.am-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  background: var(--info-bg);
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid #ff6b6b;
}

.am-list li {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--card-bg);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  line-height: 1.5;
}

.am-list li:last-child {
  margin-bottom: 0;
}

/* List Item Labels */
.am-list li i {
  color: var(--text-primary);
  font-weight: 600;
  font-style: normal;
  display: block;
  margin-bottom: 0.5rem;
}

/* Affiliate Links */
.am-list li:not(:first-child) {
  font-family: 'Courier New', monospace;
  word-break: break-all;
  background: var(--hover-bg);
}

/* Keyword Highlight */
.am-list b {
  background: #ff6b6b;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}

/* First List Item (Base Link) */
.am-list li:first-child {
  background: rgba(255, 107, 107, 0.1);
  border-color: #ff6b6b;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .am-block-nodata {
  border-color: var(--border-color);
}

[data-theme="dark"] .am-list b {
  background: #ff8787;
  color: #1a1a1a;
}

[data-theme="dark"] .am-list li:first-child {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff8787;
}

/* Responsive */
@media (max-width: 768px) {
  .container-xxl > div:last-child {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .am-block-nodata {
    padding: 1.5rem;
    font-size: 15px;
  }
  
  .am-block-nodata:before {
    font-size: 2.5rem;
  }
  
  .container-xxl h2 {
    font-size: 1.25rem;
  }
  
  .am-list {
    padding: 1rem;
  }
  
  .am-list li {
    padding: 0.6rem;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .container-xxl p {
    font-size: 14px;
  }
  
  .am-list li {
    font-size: 12px;
  }
}
.am-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.am-pagination a,
.am-pagination span {
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  background-color: #f2f2f2;
  transition: background 0.2s ease;
  border: 1px solid #ddd;
}

.am-pagination a:hover {
  background-color: #e6e6e6;
  color: #111;
}

.am-pagination .am-pagination-current {
  background-color: #4F46E5; /* Indigo */
  color: white;
  font-weight: 600;
  border: none;
}
.am-footer-content-wrapper {
  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin: 20px;
}

.am-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

/* For better text visibility on glassmorphism */
.am-credits, .am-footer-sm a {
  color: rgba(86, 86, 86, 1);
}

/* Optional hover effect for social links */
.am-footer-sm a:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}
