:root { --bg: #f6f8fb; --card: #ffffff; --muted: #6b7280; --accent: #2563eb; --accent-2: #7c3aed; --danger: #ef4444; --radius: 10px; --shadow: 0 6px 18px rgba(15, 23, 42, 0.06); --max-width: 1100px; } * { box-sizing: border-box; } body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; background: var(--bg); color: #0f172a; margin: 0; padding: 24px; display: flex; justify-content: center; line-height: 1.5; } .container { width: 100%; max-width: var(--max-width); } h2 { margin: 0 0 18px 0; font-weight: 600; color: #0f172a; } .card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; } .card.small { padding: 12px; } .row { display: flex; gap: 16px; align-items: flex-start; } /* ---------- Buttons ---------- */ button { background: var(--accent); color: #fff; border: none; padding: 10px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease; } button:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); } button:active { transform: scale(0.97); } button.secondary { background: #e6eef9; color: var(--accent); } button.secondary:hover { background: #d3e2fd; } button.danger { background: var(--danger); } button.danger:hover { background: #dc2626; } button:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } /* ---------- Inputs & Selects ---------- */ input, select, textarea { padding: 10px 12px; border-radius: 8px; border: 1px solid #e6eef9; background: #fff; outline: none; font-family: inherit; font-size: 0.95rem; transition: border 0.2s, box-shadow 0.2s; } input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08); border-color: var(--accent); } label { font-weight: 500; margin-bottom: 4px; display: block; color: #334155; } /* ---------- Admin Login ---------- */ #loginArea { max-width: 420px; margin: 60px auto; } #loginArea .card { display: flex; flex-direction: column; gap: 12px; } #loginArea h2 { text-align: center; } /* ---------- Dashboard Stats ---------- */ #dashboard .row { margin-bottom: 24px; } .stat-card { flex: 1; min-width: 120px; background: linear-gradient(135deg, #ffffff 0%, #fafcff 100%); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; transition: transform 0.2s ease; } .stat-card:hover { transform: translateY(-2px); } .stat-card .stat-number { font-size: 2.2rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; } .stat-card .stat-label { color: var(--muted); font-size: 0.9rem; } /* ---------- Table (photos) ---------- */ table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); } th, td { padding: 12px 16px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: middle; } th { background: #f8fafc; font-weight: 600; color: #475569; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; } tr:last-child td { border-bottom: none; } tr:hover td { background: #f8fafc; } img.thumb { width: 100px; height: 75px; object-fit: cover; border-radius: 6px; border: 1px solid #eef2f7; transition: transform 0.2s ease; cursor: pointer; } img.thumb:hover { transform: scale(2.5); z-index: 10; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); } /* ---------- Gallery Grid (admin) ---------- */ #gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; } .gallery-item { background: #fff; border-radius: 8px; padding: 8px; text-align: center; box-shadow: 0 6px 12px rgba(2, 6, 23, 0.04); transition: transform 0.2s ease, box-shadow 0.2s ease; } .gallery-item:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(2, 6, 23, 0.08); } .gallery-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; } .gallery-item small { display: block; color: var(--muted); margin-top: 6px; font-size: 0.8rem; } .gallery-item .actions { display: flex; justify-content: center; gap: 6px; margin-top: 6px; } .gallery-item .actions button { padding: 4px 8px; font-size: 0.75rem; } /* ---------- User Interface (Webcam) ---------- */ .video-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; } video#video { border-radius: 12px; box-shadow: 0 6px 24px rgba(2, 6, 23, 0.1); max-width: 100%; height: auto; background: #000; border: 1px solid #e2e8f0; } .controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; } .controls button { padding: 10px 18px; border-radius: 8px; } /* Status / recognition output */ #status { background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); padding: 14px 20px; border-radius: 8px; box-shadow: 0 6px 12px rgba(2, 6, 23, 0.03); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; } #user-name { font-weight: 700; font-size: 1.1rem; color: #0f172a; } #user-name.verified { color: #16a34a; } #user-name.unverified { color: var(--danger); } #confidence { color: var(--muted); font-size: 0.9rem; } .label { font-weight: 600; color: #0f172a; } .small-muted { color: var(--muted); font-size: 0.9rem; } /* Liveness indicator */ #liveness-status { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; } #liveness-status.pass { background: #dcfce7; color: #16a34a; } #liveness-status.fail { background: #fee2e2; color: #b91c1c; } /* Canvas overlay for face detection boxes (client-side) */ canvas.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 12px; } .video-container { position: relative; display: inline-block; } /* ---------- Registration Page ---------- */ .registration-steps { display: flex; flex-direction: column; gap: 12px; } .registration-steps .step { display: flex; align-items: center; gap: 12px; } .registration-steps .step .number { background: var(--accent); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; } .capture-hint { background: #fff7ed; border: 1px solid #fed7aa; padding: 12px; border-radius: 8px; color: #9a3412; margin-top: 12px; } /* ---------- Responsive ---------- */ @media (max-width: 820px) { .row { flex-direction: column; } .container { padding: 12px; } body { padding: 12px; } th, td { padding: 8px 10px; } img.thumb { width: 60px; height: 45px; } #gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } .controls button { padding: 8px 12px; } } /* ---------- Loading indicator ---------- */ .loader { width: 24px; height: 24px; border: 3px solid #e2e8f0; border-top: 3px solid var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Utility */ .text-center { text-align: center; } .mt-2 { margin-top: 12px; } .mb-2 { margin-bottom: 12px; } .flex { display: flex; } .gap-2 { gap: 8px; }