EALPR_FLASK / static /css /style.css
Pant0x's picture
Final synced deploy v2 - Fix session and timeouts
cd01269
Raw
History Blame Contribute Delete
22.6 kB
/* ═══════════════════════════════════════════════════════════
Ain El Aql β€” Dark CCTV-Style Dashboard
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
/* ── CSS Variables ─────────────────────────────────────────── */
:root {
--bg-primary: #0a0e17;
--bg-secondary: #111827;
--bg-card: #1a2236;
--bg-card-hover: #1f2a42;
--bg-input: #0d1321;
--border-color: #2a3654;
--border-glow: #3b82f6;
--text-primary: #e2e8f0;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--accent-blue: #3b82f6;
--accent-cyan: #06b6d4;
--accent-green: #10b981;
--accent-red: #ef4444;
--accent-amber: #f59e0b;
--accent-purple: #8b5cf6;
--gradient-blue: linear-gradient(135deg, #3b82f6, #06b6d4);
--gradient-green: linear-gradient(135deg, #10b981, #34d399);
--gradient-red: linear-gradient(135deg, #ef4444, #f87171);
--gradient-purple: linear-gradient(135deg, #8b5cf6, #a78bfa);
--shadow-sm: 0 1px 3px rgba(0,0,0,.4);
--shadow-md: 0 4px 14px rgba(0,0,0,.5);
--shadow-lg: 0 10px 30px rgba(0,0,0,.6);
--shadow-glow-blue: 0 0 20px rgba(59,130,246,.15);
--shadow-glow-green: 0 0 20px rgba(16,185,129,.15);
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 20px;
--transition: all .25s cubic-bezier(.4,0,.2,1);
}
/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
font-family: 'Inter', system-ui, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
a { color: var(--accent-cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-blue); }
/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }
/* ── Layout ────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
width: 260px; background: var(--bg-secondary);
border-right: 1px solid var(--border-color);
display: flex; flex-direction: column;
position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
transition: var(--transition);
}
.sidebar-header {
padding: 1.5rem; border-bottom: 1px solid var(--border-color);
display: flex; align-items: center; gap: .75rem;
}
.sidebar-logo {
width: 40px; height: 40px; border-radius: var(--radius-sm);
background: var(--gradient-blue); display: grid; place-items: center;
font-weight: 800; font-size: 1.1rem; color: #fff;
}
.sidebar-title { font-weight: 700; font-size: 1rem; }
.sidebar-subtitle { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.sidebar-nav { flex: 1; padding: 1rem .75rem; display: flex; flex-direction: column; gap: 4px; }
.nav-link {
display: flex; align-items: center; gap: .75rem;
padding: .7rem 1rem; border-radius: var(--radius-sm);
color: var(--text-secondary); font-size: .875rem; font-weight: 500;
transition: var(--transition); cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.nav-link:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-link.active { background: rgba(59,130,246,.12); color: var(--accent-blue); border-left: 3px solid var(--accent-blue); }
.nav-link .icon { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border-color); }
.user-badge {
display: flex; align-items: center; gap: .75rem;
padding: .5rem .75rem; border-radius: var(--radius-sm);
background: var(--bg-card);
}
.user-avatar {
width: 36px; height: 36px; border-radius: 50%;
background: var(--gradient-purple); display: grid; place-items: center;
font-weight: 700; font-size: .8rem; color: #fff;
}
.user-name { font-size: .8rem; font-weight: 600; }
.user-role { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.main-content { flex: 1; margin-left: 260px; padding: 2rem; }
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.page-subtitle { color: var(--text-muted); font-size: .875rem; margin-top: .25rem; }
/* ── Cards ─────────────────────────────────────────────────── */
.card {
background: var(--bg-card); border: 1px solid var(--border-color);
border-radius: var(--radius-md); padding: 1.5rem;
transition: var(--transition);
}
.card:hover { border-color: rgba(59,130,246,.3); box-shadow: var(--shadow-glow-blue); }
.card-header {
display: flex; justify-content: space-between; align-items: center;
margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border-color);
}
.card-title { font-size: 1rem; font-weight: 700; }
.card-badge {
padding: .2rem .6rem; border-radius: 50px; font-size: .65rem;
font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
}
.badge-live { background: rgba(239,68,68,.15); color: var(--accent-red); animation: pulse-badge 2s infinite; }
.badge-ok { background: rgba(16,185,129,.15); color: var(--accent-green); }
.badge-warn { background: rgba(245,158,11,.15); color: var(--accent-amber); }
@keyframes pulse-badge { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
/* ── Stat Cards ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
background: var(--bg-card); border: 1px solid var(--border-color);
border-radius: var(--radius-md); padding: 1.25rem 1.5rem;
position: relative; overflow: hidden; transition: var(--transition);
}
.stat-card::before {
content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.blue::before { background: var(--gradient-blue); }
.stat-card.green::before { background: var(--gradient-green); }
.stat-card.red::before { background: var(--gradient-red); }
.stat-card.purple::before { background: var(--gradient-purple); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; margin: .25rem 0; font-family: 'JetBrains Mono', monospace; }
.stat-value.blue { color: var(--accent-blue); }
.stat-value.green { color: var(--accent-green); }
.stat-value.red { color: var(--accent-red); }
.stat-value.purple { color: var(--accent-purple); }
.stat-detail { font-size: .75rem; color: var(--text-secondary); }
/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(59,130,246,.06); }
th {
padding: .75rem 1rem; text-align: left; font-size: .7rem;
text-transform: uppercase; letter-spacing: .06em;
color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-color);
}
td {
padding: .75rem 1rem; font-size: .85rem; border-bottom: 1px solid rgba(42,54,84,.5);
color: var(--text-secondary);
}
tr:hover td { background: rgba(59,130,246,.04); color: var(--text-primary); }
.mono { font-family: 'JetBrains Mono', monospace; font-size: .8rem; }
/* ── Buttons ───────────────────────────────────────────────── */
.btn {
display: inline-flex; align-items: center; gap: .5rem;
padding: .6rem 1.25rem; border-radius: var(--radius-sm);
font-size: .85rem; font-weight: 600; cursor: pointer;
border: 1px solid transparent; transition: var(--transition);
font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--gradient-blue); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 20px rgba(59,130,246,.35); transform: translateY(-1px); }
.btn-success { background: var(--gradient-green); color: #fff; }
.btn-success:hover { box-shadow: 0 4px 20px rgba(16,185,129,.35); transform: translateY(-1px); }
.btn-danger { background: var(--gradient-red); color: #fff; }
.btn-danger:hover { box-shadow: 0 4px 20px rgba(239,68,68,.35); transform: translateY(-1px); }
.btn-outline {
background: transparent; border-color: var(--border-color); color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(59,130,246,.06); }
.btn-sm { padding: .4rem .8rem; font-size: .75rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: var(--radius-sm); }
/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .4rem; }
.form-input, .form-select {
width: 100%; padding: .7rem 1rem; background: var(--bg-input);
border: 1px solid var(--border-color); border-radius: var(--radius-sm);
color: var(--text-primary); font-size: .875rem; font-family: 'Inter', sans-serif;
transition: var(--transition);
}
.form-input:focus, .form-select:focus {
outline: none; border-color: var(--accent-blue);
box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-input::placeholder { color: var(--text-muted); }
/* ── Alerts ────────────────────────────────────────────────── */
.alert {
padding: .85rem 1.25rem; border-radius: var(--radius-sm);
font-size: .85rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem;
border: 1px solid;
}
.alert-error { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: #6ee7b7; }
.alert-info { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.25); color: #93c5fd; }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); color: #fcd34d; }
/* ── CCTV Camera Feed ──────────────────────────────────────── */
.camera-feed {
position: relative; background: #000; border-radius: var(--radius-md);
overflow: hidden; border: 2px solid var(--border-color);
aspect-ratio: 16/9;
}
.camera-feed img, .camera-feed video {
width: 100%; height: 100%; object-fit: cover;
}
.camera-overlay {
position: absolute; top: 0; left: 0; right: 0;
padding: .5rem .75rem;
background: linear-gradient(180deg, rgba(0,0,0,.7), transparent);
display: flex; justify-content: space-between; align-items: center;
}
.camera-overlay .rec {
display: flex; align-items: center; gap: .4rem;
font-size: .7rem; font-weight: 700; color: var(--accent-red);
text-transform: uppercase; letter-spacing: .08em;
}
.camera-overlay .rec::before {
content: ''; width: 8px; height: 8px; background: var(--accent-red);
border-radius: 50%; animation: pulse-badge 1.5s infinite;
}
.camera-overlay .timestamp {
font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: rgba(255,255,255,.7);
}
.camera-controls {
display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap;
}
.camera-placeholder {
display: flex; flex-direction: column; align-items: center;
justify-content: center; height: 100%; color: var(--text-muted);
font-size: .85rem; gap: .5rem;
}
.camera-placeholder .icon { font-size: 3rem; opacity: .3; }
/* ── OCR Result Panel ──────────────────────────────────────── */
.ocr-result {
border: 1px solid var(--border-color); border-radius: var(--radius-md);
overflow: hidden; background: var(--bg-card);
}
.ocr-result-header {
padding: 1rem 1.5rem; display: flex; justify-content: space-between;
align-items: center; border-bottom: 1px solid var(--border-color);
}
.ocr-plate {
font-family: 'JetBrains Mono', monospace; font-size: 1.75rem;
font-weight: 800; letter-spacing: .05em;
}
.ocr-result-body { padding: 1.25rem 1.5rem; }
.ocr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ocr-field-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; }
.ocr-field-value { font-size: .9rem; font-weight: 600; }
.ocr-image { border-radius: var(--radius-sm); max-width: 100%; margin-top: 1rem; border: 1px solid var(--border-color); }
/* ── Status indicators ─────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-registered { color: var(--accent-green); }
.status-registered::before { background: var(--accent-green); box-shadow: 0 0 8px rgba(16,185,129,.5); }
.status-unregistered { color: var(--accent-red); }
.status-unregistered::before { background: var(--accent-red); box-shadow: 0 0 8px rgba(239,68,68,.5); }
.status-active { color: var(--accent-cyan); }
.status-active::before { background: var(--accent-cyan); box-shadow: 0 0 8px rgba(6,182,212,.5); }
/* ── Gate Status ───────────────────────────────────────────── */
.gate-status {
display: flex; align-items: center; gap: 1rem;
padding: 1rem 1.5rem; border-radius: var(--radius-md);
font-weight: 700; font-size: 1rem;
}
.gate-open { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: var(--accent-green); }
.gate-closed { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: var(--accent-red); }
.gate-icon { font-size: 1.5rem; }
/* ── Auth Pages ────────────────────────────────────────────── */
.auth-wrapper {
min-height: 100vh; display: grid; place-items: center;
background: var(--bg-primary);
background-image: radial-gradient(ellipse at 20% 50%, rgba(59,130,246,.08) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.06) 0%, transparent 50%);
}
.auth-card {
width: 100%; max-width: 420px; padding: 2.5rem;
background: var(--bg-card); border: 1px solid var(--border-color);
border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-icon {
width: 64px; height: 64px; margin: 0 auto .75rem;
background: var(--gradient-blue); border-radius: var(--radius-md);
display: grid; place-items: center; font-size: 1.75rem; color: #fff; font-weight: 800;
}
.auth-logo h1 { font-size: 1.5rem; font-weight: 800; }
.auth-logo p { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .8rem; color: var(--text-muted); }
/* ── Grid layouts ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
position: fixed; inset: 0; background: rgba(0,0,0,.65);
backdrop-filter: blur(4px); display: none; place-items: center; z-index: 1000;
}
.modal-overlay.active { display: grid; }
.modal {
background: var(--bg-card); border: 1px solid var(--border-color);
border-radius: var(--radius-lg); padding: 2rem; width: 90%; max-width: 500px;
box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.25rem; cursor: pointer; }
.modal-close:hover { color: var(--text-primary); }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }
/* ── Loading ───────────────────────────────────────────────── */
.spinner {
width: 32px; height: 32px; border: 3px solid var(--border-color);
border-top-color: var(--accent-blue); border-radius: 50%;
animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
position: absolute; inset: 0; background: rgba(10,14,23,.8);
display: none; place-items: center; z-index: 10; border-radius: var(--radius-md);
}
.loading-overlay.active { display: grid; }
/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .4s ease-out; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
.sidebar { width: 220px; }
.main-content { margin-left: 220px; }
.grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
.sidebar { display: none; }
.main-content { margin-left: 0; padding: 1rem; }
.grid-2, .grid-3, .content-grid { grid-template-columns: 1fr; }
.stats-grid { grid-template-columns: 1fr 1fr; }
.ocr-grid { grid-template-columns: 1fr; }
}
/* ── Utility ───────────────────────────────────────────────── */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ── Premium UI Overhaul (Uber-Professional) ────────────────── */
.glass-card {
background: rgba(26, 34, 54, 0.75);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 1.5rem;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pulse-badge {
display: flex; align-items: center; gap: 8px;
background: rgba(239, 68, 68, 0.12); color: #f87171;
padding: 6px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 700;
text-transform: uppercase; letter-spacing: 1px;
}
.pulse-dot {
width: 8px; height: 8px; background: #ef4444; border-radius: 50%;
animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
#gateOverlay {
position: fixed; inset: 0; background: rgba(10, 14, 23, 0.96);
z-index: 10000; display: none; flex-direction: column;
align-items: center; justify-content: center; backdrop-filter: blur(20px);
}
.gate-timer-circle {
width: 220px; height: 220px; border: 10px solid #10b981;
border-radius: 50%; display: grid; place-items: center;
font-size: 6.5rem; font-weight: 900; color: #10b981;
box-shadow: 0 0 60px rgba(16, 185, 129, 0.3); margin-bottom: 2rem;
}
.status-pill { padding: 4px 12px; border-radius: 6px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.status-pill.guest { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-pill.reg { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.duration-timer { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #3b82f6; background: rgba(59, 130, 246, 0.1); padding: 2px 6px; border-radius: 4px; }
.plate-display { font-family: 'JetBrains Mono', monospace; font-size: 2.5rem; font-weight: 800; letter-spacing: 2px; color: white; }