<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}CryptoSignals Pro - Trading Platform{% endblock %}</title>
    
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
    
    <style>
        :root {
            --primary-gradient: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
            --secondary-gradient: linear-gradient(135deg, #7b2ff7 0%, #f107a3 100%);
            --dark-bg: #0a0e17;
            --card-bg: #111827;
            --card-bg-hover: #1f2937;
            --border-color: #1e293b;
            --text-primary: #f8fafc;
            --text-secondary: #94a3b8;
            --accent-cyan: #00d4ff;
            --accent-purple: #7b2ff7;
            --accent-pink: #f107a3;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --glass-effect: rgba(255, 255, 255, 0.05);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Outfit', sans-serif;
            background: var(--dark-bg);
            color: var(--text-primary);
            min-height: 100vh;
            background-image: 
                radial-gradient(ellipse at top left, rgba(123, 47, 247, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
        }
        
        /* Navbar */
        .navbar {
            background: rgba(17, 24, 39, 0.8) !important;
            backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border-color);
            padding: 0.75rem 0;
        }
        
        .navbar-brand {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 1.5rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .navbar-brand i {
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .nav-link {
            color: var(--text-secondary) !important;
            font-weight: 500;
            padding: 0.5rem 1rem !important;
            border-radius: 8px;
            transition: all 0.3s ease;
        }
        
        .nav-link:hover {
            color: var(--accent-cyan) !important;
            background: rgba(0, 212, 255, 0.1);
        }
        
        /* Cards */
        .card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            transition: all 0.3s ease;
        }
        
        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            border-color: rgba(123, 47, 247, 0.3);
        }
        
        .card-header {
            background: transparent;
            border-bottom: 1px solid var(--border-color);
            padding: 1.25rem;
        }
        
        .card-body {
            padding: 1.25rem;
        }
        
        /* Stat Cards */
        .stat-card {
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(123, 47, 247, 0.1) 100%);
            border: 1px solid rgba(0, 212, 255, 0.2);
            border-radius: 16px;
            position: relative;
            overflow: hidden;
        }
        
        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--primary-gradient);
        }
        
        .stat-card.earnings {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
            border-color: rgba(16, 185, 129, 0.2);
        }
        
        .stat-card.referrals {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(123, 47, 247, 0.1) 100%);
            border-color: rgba(245, 158, 11, 0.2);
        }
        
        .stat-card.signals {
            background: linear-gradient(135deg, rgba(123, 47, 247, 0.1) 0%, rgba(241, 7, 163, 0.1) 100%);
            border-color: rgba(123, 47, 247, 0.2);
        }
        
        .stat-card .icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }
        
        .stat-card .icon.cyan {
            background: rgba(0, 212, 255, 0.2);
            color: var(--accent-cyan);
        }
        
        .stat-card .icon.green {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }
        
        .stat-card .icon.purple {
            background: rgba(123, 47, 247, 0.2);
            color: var(--accent-purple);
        }
        
        .stat-card .icon.orange {
            background: rgba(245, 158, 11, 0.2);
            color: var(--warning);
        }
        
        /* Buttons */
        .btn-primary {
            background: var(--primary-gradient);
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 10px;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
        }
        
        .btn-outline-primary {
            border: 1px solid rgba(0, 212, 255, 0.3);
            color: var(--accent-cyan);
            border-radius: 10px;
            padding: 0.75rem 1.5rem;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .btn-outline-primary:hover {
            background: rgba(0, 212, 255, 0.1);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
        }
        
        /* Forms */
        .form-control, .form-select {
            background: var(--dark-bg);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            border-radius: 10px;
            padding: 0.75rem 1rem;
            transition: all 0.3s ease;
        }
        
        .form-control:focus, .form-select:focus {
            background: var(--dark-bg);
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
            color: var(--text-primary);
        }
        
        .form-label {
            color: var(--text-secondary);
            font-weight: 500;
            margin-bottom: 0.5rem;
        }
        
        /* Tables */
        .table {
            color: var(--text-primary);
        }
        
        .table thead th {
            background: var(--dark-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.05em;
            padding: 1rem;
        }
        
        .table tbody tr {
            transition: all 0.2s ease;
        }
        
        .table tbody tr:hover {
            background: rgba(0, 212, 255, 0.05);
        }
        
        .table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            vertical-align: middle;
        }
        
        /* Badges */
        .badge {
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.75rem;
        }
        
        .badge-buy {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }
        
        .badge-sell {
            background: rgba(239, 68, 68, 0.2);
            color: var(--danger);
        }
        
        .badge-active {
            background: rgba(0, 212, 255, 0.2);
            color: var(--accent-cyan);
        }
        
        .badge-completed {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }

        .badge-approved {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }
        
        .badge-pending {
            background: rgba(245, 158, 11, 0.2);
            color: var(--warning);
        }

        .badge-rejected {
            background: rgba(239, 68, 68, 0.2);
            color: var(--danger);
        }
        
        .badge-cancelled {
            background: rgba(239, 68, 68, 0.2);
            color: var(--danger);
        }
        
        /* Auth Pages */
        .auth-container {
            min-height: calc(100vh - 200px);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .auth-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 24px;
            padding: 2rem;
            max-width: 450px;
            width: 100%;
            position: relative;
            overflow: hidden;
        }
        
        .auth-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--primary-gradient);
        }
        
        .auth-icon {
            width: 80px;
            height: 80px;
            border-radius: 20px;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
            font-size: 2rem;
        }
        
        /* Main Content */
        .main-content {
            padding: 2rem;
            min-height: calc(100vh - 140px);
        }
        
        .page-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* Footer */
        .footer {
            background: var(--card-bg);
            border-top: 1px solid var(--border-color);
            padding: 1.5rem 0;
        }
        
        /* Dropdown */
        .dropdown-menu {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 0.5rem;
        }
        
        .dropdown-item {
            color: var(--text-secondary);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            transition: all 0.2s ease;
        }
        
        .dropdown-item:hover {
            background: rgba(0, 212, 255, 0.1);
            color: var(--accent-cyan);
        }
        
        /* Alerts */
        .alert {
            border-radius: 12px;
            border: none;
            padding: 1rem 1.25rem;
        }
        
        .alert-success {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }
        
        .alert-danger {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }
        
        /* Pagination */
        .page-link {
            background: var(--card-bg);
            border-color: var(--border-color);
            color: var(--text-secondary);
            border-radius: 8px;
            padding: 0.5rem 0.75rem;
        }
        
        .page-link:hover {
            background: rgba(0, 212, 255, 0.1);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
        }
        
        .page-item.active .page-link {
            background: var(--primary-gradient);
            border-color: transparent;
        }
        
        /* Animations */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .animate-fade-in {
            animation: fadeIn 0.5s ease forwards;
        }
        
        .animate-delay-1 { animation-delay: 0.1s; }
        .animate-delay-2 { animation-delay: 0.2s; }
        .animate-delay-3 { animation-delay: 0.3s; }
        .animate-delay-4 { animation-delay: 0.4s; }
        
        /* Custom Text Colors */
        .custom-text-muted { color: #64748b !important; }
        .custom-text-white { color: #fff !important; }
        .custom-text-success { color: #10b981 !important; }
        .custom-text-warning { color: #f59e0b !important; }
        .custom-text-danger { color: #ef4444 !important; }
        .custom-text-primary { color: #00d4ff !important; }
        .custom-text-purple { color: #7b2ff7 !important; }

        @media (max-width: 767.98px) {
            .main-content {
                padding: 1rem;
            }

            .page-title {
                font-size: 1.6rem;
                margin-bottom: 1rem;
            }

            .navbar-brand {
                font-size: 1.25rem;
            }

            .btn-outline-primary,
            .btn-primary {
                padding: 0.65rem 1rem;
            }
        }
    </style>
    
    {% block extra_css %}{% endblock %}
</head>
<body>
    {% include 'base/navbar.html' %}
    
    <div class="main-content">
        {% block content %}{% endblock %}
    </div>
    
    {% include 'base/footer.html' %}
    
    <!-- Bootstrap 5 JS Bundle -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    {% block extra_js %}{% endblock %}
</body>
</html>
