/* AmanPay Modern Fintech Theme */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #374151;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --border-color: #374151;
  --font-family: 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-bottom: 1px solid #334155;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.logo-text p {
  font-size: 11px;
  color: var(--accent-cyan);
}

.system-status-pills {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-pill {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.balance-card {
  background: rgba(31, 41, 55, 0.6);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 8px;
  text-align: left;
}

.balance-card .lbl { font-size: 10px; color: var(--text-muted); }
.balance-card .val { font-size: 15px; font-weight: bold; color: #fbbf24; }

/* Navigation Tabs */
.nav-tabs {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  padding: 0 32px;
  gap: 8px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

/* Main Container */
.main-content {
  flex: 1;
  padding: 24px 32px;
  max-width: 1350px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Layout */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.card h2 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-danger:hover {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* Terminal / ATM Visual Display */
.atm-terminal-screen {
  background: radial-gradient(circle, #022c43 0%, #051923 100%);
  border: 4px solid #334155;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: #38bdf8;
  font-family: 'Courier New', monospace;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(56, 189, 248, 0.2);
  margin-bottom: 16px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.atm-cash-slot {
  height: 18px;
  background-color: #0f172a;
  border: 2px solid #475569;
  border-radius: 4px;
  margin: 15px auto;
  width: 60%;
  position: relative;
  overflow: hidden;
}

.cash-anim, .atm-cash-note {
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #10b981, #10b981 10px, #059669 10px, #059669 20px);
  animation: dispenseCash 1.5s infinite;
}

@keyframes dispenseCash {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0%); }
  100% { transform: translateY(100%); }
}

/* Palm scanner visual */
.palm-scanner-zone {
  width: 140px;
  height: 140px;
  border: 2px dashed var(--accent-cyan);
  border-radius: 50%;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  background-color: rgba(6, 182, 212, 0.05);
  transition: all 0.3s;
}

.palm-scanner-zone:hover {
  background-color: rgba(6, 182, 212, 0.15);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
}

.scan-laser {
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: laserScan 2s infinite ease-in-out;
}

@keyframes laserScan {
  0% { top: 10%; }
  50% { top: 90%; }
  100% { top: 10%; }
}

/* Results & Code blocks */
.res-box {
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11.5px;
  color: #38bdf8;
  max-height: 250px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
}

.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}

.badge-success { background-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-danger { background-color: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-info { background-color: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* Table styling */
.fintech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.fintech-table th {
  background-color: var(--bg-card);
  color: var(--text-muted);
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
}

.fintech-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.4);
}

.fintech-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* ============================================================= */
/* BIOMETRIC HUD MODAL & CAMERA STREAM */
/* ============================================================= */
.bio-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease;
}

.bio-modal-card {
  background: linear-gradient(135deg, #111827, #1e293b);
  border: 1px solid #38bdf8;
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  padding: 20px;
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.35);
}

.bio-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.modal-close-btn:hover { color: #fff; background-color: rgba(255,255,255,0.1); }

.camera-stream-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-stream-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror selfie view */
}

/* Futuristic HUD Elements */
.hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bio-laser-beam {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), #38bdf8, var(--accent-cyan), transparent);
  box-shadow: 0 0 15px var(--accent-cyan);
  animation: laserScanDown 2.2s infinite ease-in-out;
}

@keyframes laserScanDown {
  0% { top: 5%; opacity: 0.2; }
  50% { top: 92%; opacity: 1; }
  100% { top: 5%; opacity: 0.2; }
}

.hud-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.face-reticle {
  width: 180px;
  height: 220px;
}

.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--accent-cyan);
}
.corner.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.target-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-top: 1px dashed rgba(6, 182, 212, 0.6);
  border-left: 1px dashed rgba(6, 182, 212, 0.6);
}

.face-oval-guide {
  position: absolute;
  top: 5%;
  left: 10%;
  width: 80%;
  height: 90%;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: 50%;
}

.palm-reticle {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palm-contour-guide {
  font-size: 90px;
  opacity: 0.45;
  filter: drop-shadow(0 0 10px var(--accent-cyan));
  animation: palmPulse 1.8s infinite alternate;
}

@keyframes palmPulse {
  0% { transform: scale(0.95); opacity: 0.35; }
  100% { transform: scale(1.05); opacity: 0.6; }
}

.live-telemetry {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.bio-status-bar {
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 12.5px;
  color: #38bdf8;
  text-align: center;
}
