mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 17:32:58 +00:00
- Fix secondary buttons with white background/border invisibility - Improve disabled button states with proper contrast ratios - Update form element borders for better visibility - Establish unified color system with CSS variables - Replace 11 random gradient classes with 4 professional ones - Fix authentication page styling and button definitions - Ensure accessibility compliance with visible interactive elements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
317 lines
8.8 KiB
HTML
317 lines
8.8 KiB
HTML
{% extends 'base.html' %}
|
|
{% load static %}
|
|
|
|
{% block title %}Wallet - NetCop Hub{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
/* Wallet page styles */
|
|
.wallet-page {
|
|
background: var(--gradient-hero);
|
|
min-height: calc(100vh - 80px);
|
|
padding: clamp(20px, 5vw, 40px) 0;
|
|
}
|
|
|
|
/* Hero section */
|
|
.wallet-hero {
|
|
background: var(--gradient-success);
|
|
color: white;
|
|
padding: clamp(20px, 4vw, 24px) 0;
|
|
text-align: center;
|
|
margin-bottom: clamp(16px, 4vw, 20px);
|
|
border-radius: clamp(12px, 3vw, 16px);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.wallet-hero h1 {
|
|
font-size: clamp(20px, 5vw, 24px);
|
|
margin: 0 0 8px 0;
|
|
font-weight: 700;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.wallet-hero .current-balance {
|
|
font-size: clamp(28px, 7vw, 36px);
|
|
font-weight: 800;
|
|
margin: 8px 0 16px 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
text-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.wallet-hero .balance-label {
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
opacity: 0.9;
|
|
margin-bottom: 12px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Top up button */
|
|
.topup-btn {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: white;
|
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
padding: clamp(12px, 3vw, 16px) clamp(24px, 6vw, 32px);
|
|
border-radius: clamp(8px, 2vw, 12px);
|
|
font-size: clamp(16px, 4vw, 18px);
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
transition: all 0.3s ease;
|
|
position: relative;
|
|
z-index: 1;
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.topup-btn:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 25px rgba(0,0,0,0.2);
|
|
color: white;
|
|
}
|
|
|
|
/* Stats grid */
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
|
|
gap: clamp(16px, 4vw, 24px);
|
|
margin-bottom: clamp(24px, 6vw, 32px);
|
|
}
|
|
|
|
.stat-card {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: clamp(12px, 3vw, 16px);
|
|
padding: clamp(20px, 5vw, 24px);
|
|
text-align: center;
|
|
border: 1px solid rgba(16, 185, 129, 0.1);
|
|
backdrop-filter: blur(20px);
|
|
box-shadow: 0 8px 25px rgba(16, 185, 129, 0.1);
|
|
transition: all 0.3s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.stat-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 4px;
|
|
background: var(--gradient-success);
|
|
}
|
|
|
|
.stat-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
|
|
}
|
|
|
|
.stat-icon {
|
|
font-size: clamp(32px, 8vw, 40px);
|
|
margin-bottom: 12px;
|
|
display: block;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: clamp(24px, 6vw, 32px);
|
|
font-weight: 700;
|
|
color: var(--success-green);
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Transactions section */
|
|
.transactions-card {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: clamp(12px, 3vw, 16px);
|
|
padding: clamp(20px, 5vw, 24px);
|
|
border: 1px solid rgba(16, 185, 129, 0.1);
|
|
backdrop-filter: blur(20px);
|
|
box-shadow: 0 8px 25px rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
.transactions-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: clamp(20px, 5vw, 24px);
|
|
padding-bottom: 16px;
|
|
border-bottom: 2px solid var(--border-light);
|
|
}
|
|
|
|
.transactions-title {
|
|
font-size: clamp(20px, 5vw, 24px);
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.transaction-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: clamp(16px, 4vw, 20px) 0;
|
|
border-bottom: 1px solid var(--border-light);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.transaction-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.transaction-item:hover {
|
|
background: rgba(16, 185, 129, 0.02);
|
|
border-radius: 8px;
|
|
margin: 0 -12px;
|
|
padding-left: 12px;
|
|
padding-right: 12px;
|
|
}
|
|
|
|
.transaction-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.transaction-description {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.transaction-date {
|
|
font-size: clamp(12px, 3vw, 14px);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.transaction-amount {
|
|
font-weight: 700;
|
|
font-size: clamp(16px, 4vw, 18px);
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.transaction-amount.positive {
|
|
color: var(--success-green);
|
|
background: rgba(5, 150, 105, 0.1);
|
|
}
|
|
|
|
.transaction-amount.negative {
|
|
color: var(--error-red);
|
|
background: rgba(220, 38, 38, 0.1);
|
|
}
|
|
|
|
.no-transactions {
|
|
text-align: center;
|
|
padding: clamp(32px, 8vw, 48px);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.no-transactions-icon {
|
|
font-size: clamp(48px, 12vw, 64px);
|
|
margin-bottom: 16px;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.no-transactions-text {
|
|
font-size: clamp(16px, 4vw, 18px);
|
|
margin: 0;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
.stats-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.transaction-item {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
}
|
|
|
|
.transaction-amount {
|
|
align-self: flex-end;
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="wallet-page">
|
|
<!-- Hero Section -->
|
|
<div class="wallet-hero">
|
|
<h1>💰 Your Wallet</h1>
|
|
<div class="balance-label">Current Balance</div>
|
|
<div class="current-balance">{{ current_balance|floatformat:2 }} AED</div>
|
|
<a href="{% url 'core:wallet_topup' %}" class="topup-btn">
|
|
💳 Top Up Wallet
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Statistics -->
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-icon">💸</div>
|
|
<div class="stat-value">{{ total_spent|floatformat:2 }} AED</div>
|
|
<div class="stat-label">Total Spent</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon">💵</div>
|
|
<div class="stat-value">{{ total_topped_up|floatformat:2 }} AED</div>
|
|
<div class="stat-label">Total Topped Up</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-icon">📊</div>
|
|
<div class="stat-value">{{ transactions|length }}</div>
|
|
<div class="stat-label">Total Transactions</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Recent Transactions -->
|
|
<div class="transactions-card">
|
|
<div class="transactions-header">
|
|
<h2 class="transactions-title">📋 Recent Transactions</h2>
|
|
</div>
|
|
|
|
{% if transactions %}
|
|
{% for transaction in transactions %}
|
|
<div class="transaction-item">
|
|
<div class="transaction-info">
|
|
<div class="transaction-description">{{ transaction.description }}</div>
|
|
<div class="transaction-date">{{ transaction.created_at|date:"M d, Y H:i" }}</div>
|
|
</div>
|
|
<div class="transaction-amount {% if transaction.type == 'top_up' %}positive{% else %}negative{% endif %}">
|
|
{% if transaction.type == 'top_up' %}
|
|
<span>↗️</span> +{{ transaction.amount|floatformat:2 }} AED
|
|
{% else %}
|
|
<span>↙️</span> -{{ transaction.amount|floatformat:2 }} AED
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="no-transactions">
|
|
<div class="no-transactions-icon">📭</div>
|
|
<p class="no-transactions-text">No transactions yet. Start using AI agents to see your transaction history!</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_js %}
|
|
{% endblock %} |