203 lines
6.7 KiB
HTML
203 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ar" dir="rtl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}GSPARC Mezzouna{% endblock %}</title>
|
|
<style>
|
|
:root {
|
|
--bg: #f5f5f5;
|
|
--card: #ffffff;
|
|
--primary: #1a3a5c;
|
|
--accent: #d4a574;
|
|
--text: #333;
|
|
--text-light: #666;
|
|
--border: #e0e0e0;
|
|
--danger: #d32f2f;
|
|
--success: #2e7d32;
|
|
--warning: #f57c00;
|
|
--radius: 8px;
|
|
}
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
line-height: 1.6;
|
|
min-height: 100vh;
|
|
}
|
|
header {
|
|
background: var(--primary);
|
|
color: white;
|
|
padding: 1rem 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
header h1 { font-size: 1.3rem; }
|
|
header nav a {
|
|
color: white;
|
|
text-decoration: none;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: var(--radius);
|
|
transition: background 0.2s;
|
|
}
|
|
header nav a:hover { background: rgba(255,255,255,0.15); }
|
|
header nav a.active { background: var(--accent); }
|
|
|
|
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
|
|
|
|
.card {
|
|
background: var(--card);
|
|
border-radius: var(--radius);
|
|
padding: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
|
|
}
|
|
.card h2 {
|
|
color: var(--primary);
|
|
margin-bottom: 1rem;
|
|
font-size: 1.2rem;
|
|
border-bottom: 2px solid var(--accent);
|
|
padding-bottom: 0.5rem;
|
|
}
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
.stat-card {
|
|
background: var(--card);
|
|
border-radius: var(--radius);
|
|
padding: 1.2rem;
|
|
text-align: center;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
|
|
border-top: 3px solid var(--primary);
|
|
}
|
|
.stat-card .number { font-size: 2rem; font-weight: bold; color: var(--primary); }
|
|
.stat-card .label { color: var(--text-light); font-size: 0.9rem; margin-top: 0.3rem; }
|
|
.stat-card.warning { border-top-color: var(--warning); }
|
|
.stat-card.warning .number { color: var(--warning); }
|
|
.stat-card.success { border-top-color: var(--success); }
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
th, td {
|
|
padding: 0.75rem;
|
|
text-align: right;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
th {
|
|
background: var(--primary);
|
|
color: white;
|
|
font-weight: 600;
|
|
}
|
|
tr:hover { background: rgba(26,58,92,0.03); }
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 0.6rem 1.2rem;
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
cursor: pointer;
|
|
font-size: 0.95rem;
|
|
text-decoration: none;
|
|
transition: opacity 0.2s;
|
|
}
|
|
.btn:hover { opacity: 0.85; }
|
|
.btn-primary { background: var(--primary); color: white; }
|
|
.btn-danger { background: var(--danger); color: white; }
|
|
.btn-success { background: var(--success); color: white; }
|
|
.btn-warning { background: var(--warning); color: white; }
|
|
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
|
|
|
|
form {
|
|
max-width: 600px;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 0.3rem;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
}
|
|
.form-group input, .form-group select, .form-group textarea {
|
|
width: 100%;
|
|
padding: 0.6rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
font-size: 0.95rem;
|
|
font-family: inherit;
|
|
}
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.alert {
|
|
padding: 1rem;
|
|
border-radius: var(--radius);
|
|
margin-bottom: 1rem;
|
|
}
|
|
.alert-error { background: #ffebee; color: var(--danger); border: 1px solid #ef9a9a; }
|
|
.alert-info { background: #e3f2fd; color: var(--primary); border: 1px solid #90caf9; }
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.2rem 0.6rem;
|
|
border-radius: 12px;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
}
|
|
.badge-danger { background: #ffebee; color: var(--danger); }
|
|
.badge-success { background: #e8f5e9; color: var(--success); }
|
|
.badge-warning { background: #fff3e0; color: var(--warning); }
|
|
|
|
.ocr-box {
|
|
background: #fafafa;
|
|
border: 1px dashed var(--border);
|
|
padding: 1rem;
|
|
border-radius: var(--radius);
|
|
font-family: monospace;
|
|
font-size: 0.9rem;
|
|
white-space: pre-wrap;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.form-row { grid-template-columns: 1fr; }
|
|
header { flex-direction: column; gap: 0.5rem; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
{% if request.session.get("gsparc_user") %}
|
|
<header>
|
|
<h1>⛽ GSPARC Mezzouna — متابعة الوقود</h1>
|
|
<nav>
|
|
<a href="/" class="{% if request.url.path == '/' %}active{% endif %}">📊 الرئيسية</a>
|
|
<a href="/fuel" class="{% if request.url.path.startswith('/fuel') %}active{% endif %}">⛽ تموين</a>
|
|
<a href="/vehicules" class="{% if request.url.path.startswith('/vehicules') %}active{% endif %}">🚛 العربات</a>
|
|
<a href="/anomalies" class="{% if request.url.path.startswith('/anomalies') %}active{% endif %}">⚠️ الشذوذ</a>
|
|
<a href="/logout" style="opacity:0.7;">🚪 خروج</a>
|
|
</nav>
|
|
</header>
|
|
{% endif %}
|
|
|
|
<div class="container">
|
|
{% if error %}
|
|
<div class="alert alert-error">{{ error }}</div>
|
|
{% endif %}
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</body>
|
|
</html> |