/* 
  =========================================
  OnboardPro Premium Dark/Glassmorphic CSS
  =========================================
*/

:root {
  /* Harmonious Color Palette */
  --bg-color: #0b0d10;
  --sidebar-bg: #11151d;
  --panel-bg: rgba(20, 24, 33, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary-glow: #2563eb;
  --secondary-glow: #10b981;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-blue-rgb: 59, 130, 246;
  --accent-emerald: #10b981;
  --accent-emerald-rgb: 16, 185, 129;
  --accent-purple: #a855f7;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --font-family: 'Inter', -apple-system, sans-serif;
  --header-font: 'Outfit', sans-serif;
  --code-font: 'JetBrains Mono', monospace;
  --border-radius: 16px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-color: #f3f4f6;
  --sidebar-bg: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(0, 0, 0, 0.08);
  --primary-glow: #3b82f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--transition-smooth);
}

/* Glowing Background Blobs */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  animation: float 20s infinite alternate;
}

.blob-blue {
  background-color: var(--accent-blue);
  top: -10%;
  left: 5%;
}

.blob-purple {
  background-color: var(--accent-purple);
  bottom: 10%;
  right: 5%;
  animation-delay: -5s;
}

.blob-emerald {
  background-color: var(--accent-emerald);
  top: 40%;
  left: 50%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -50px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--panel-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transform: translateZ(0);
  will-change: transform;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.05) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 32px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.brand-text h1 {
  font-family: var(--header-font);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.nav-item i {
  width: 20px;
  height: 20px;
}

.nav-item.locked {
  opacity: 0.45;
  cursor: not-allowed !important;
}

.nav-item.locked:hover {
  background: transparent !important;
  color: var(--text-secondary) !important;
}

.nav-item.locked::after {
  content: '🔒';
  font-size: 0.72rem;
  margin-left: auto;
  opacity: 0.6;
}

.badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--accent-blue);
  color: white;
  border-radius: 12px;
  font-weight: 600;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 12px 8px;
  border-top: 1px solid var(--panel-border);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  transition: var(--transition-smooth);
}

.status-indicator.offline {
  background: var(--danger-color) !important;
  box-shadow: 0 0 8px var(--danger-color) !important;
}

.status-indicator.online {
  background: var(--accent-emerald) !important;
  box-shadow: 0 0 8px var(--accent-emerald) !important;
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 32px;
  min-width: 0; /* Prevent flex overflow */
}

/* Top bar styles */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
}

.header-info h2 {
  font-family: var(--header-font);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-display {
  font-family: var(--code-font);
  font-size: 0.9rem;
  padding: 8px 16px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-secondary);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Glass Panels styling */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* General Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

.btn-tertiary {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.btn-tertiary:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.25);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-emerald:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger-outline {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* WIZARD STEP SYSTEM */
.wizard-step {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.wizard-step.active {
  display: block;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

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

/* Step Indicators */
.step-indicator-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  background: var(--panel-bg);
  padding: 16px 24px;
  border-radius: var(--border-radius);
  border: 1px solid var(--panel-border);
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 10;
  flex: 1;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--panel-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.step-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  transition: var(--transition-smooth);
}

.step-line {
  height: 2px;
  background: var(--panel-border);
  flex: 1;
  margin: 0 -24px;
  position: relative;
  top: -14px;
  z-index: 5;
}

.step-indicator.active .step-num {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.step-indicator.active .step-label {
  color: var(--text-primary);
  font-weight: 600;
}

.step-indicator.done .step-num {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: white;
}

.step-line.done {
  background: var(--accent-emerald);
}

.step-header {
  margin-bottom: 24px;
}

.step-header h3 {
  font-family: var(--header-font);
  font-size: 1.4rem;
  font-weight: 600;
}

.step-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* STEP 1 SPECIFIC STYLING (OCR ID SCANNER) */
.scan-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.document-select-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.doc-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.doc-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.doc-pill.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #60a5fa;
}

/* Camera Viewports styling */
.camera-viewport-container {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-viewport-container.portrait-ratio {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 20px;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: var(--text-secondary);
}

.scan-glow-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-blue);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.2)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.6)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.2)); }
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* ID scanner box guideline and laser styling */
.scan-overlay {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 70%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 20;
  border-radius: 8px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.6);
}

.scan-overlay .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid var(--accent-blue);
  pointer-events: none;
}

.scan-overlay .top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.scan-overlay .top-right { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.scan-overlay .bottom-left { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.scan-overlay .bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  box-shadow: 0 0 10px var(--accent-blue);
  animation: laserScan 2.5s infinite linear;
}

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

.scan-text {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(0,0,0,0.6);
  padding: 4px 12px;
  border-radius: 12px;
}

/* Portrait Face guidlines */
.face-oval-guideline {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

.oval-rim {
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(16, 185, 129, 0.7);
  box-sizing: border-box;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.oval-tip {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-emerald);
  font-weight: 600;
  font-size: 0.75rem;
  background: rgba(0,0,0,0.7);
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.shutter-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  z-index: 50;
  pointer-events: none;
}

.shutter-flash.active {
  animation: flash 0.3s ease-out;
}

@keyframes flash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

.camera-control-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.justify-center {
  justify-content: center;
}

.file-upload-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.file-upload-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

/* OCR Extraction Status Panel styling */
.ocr-status-card {
  display: flex;
  flex-direction: column;
}

.ocr-status-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.ocr-alert {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 20px;
}

.ocr-alert.info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.ocr-alert.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.ocr-scanned-preview-container h5, .ocr-results-summary h5 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 700;
}

.scanned-image-box {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scanned-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

.scanned-image-placeholder i {
  width: 32px;
  height: 32px;
}

.scanned-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-field-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 6px;
  font-size: 0.9rem;
}

.field-lbl {
  color: var(--text-secondary);
}

.field-val {
  font-family: var(--code-font);
  font-weight: 500;
}

.field-val.highlight {
  color: var(--accent-blue);
  font-weight: 600;
}

/* Spinner Loader */
.ocr-loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  gap: 16px;
  flex: 1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-bar-container {
  width: 80%;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-blue);
  transition: width 0.1s ease;
}

/* STEP 2 STYLING (PHOTO BOOTH & CANVAS DRESSER) */
.photo-studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.canvas-viewport-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  margin: 0 auto 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  position: relative;
  overflow: hidden;
}

.canvas-viewport-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-instruction {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Suit Dressing Controls panel */
.dressing-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
}

.control-section h5 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.suit-picker {
  display: flex;
  gap: 8px;
}

.suit-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.suit-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.suit-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: #34d399;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title-row h5 {
  margin-bottom: 0;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* DPAD Controller styling */
.dpad-container {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(3, 40px);
  gap: 8px;
  justify-content: center;
  margin: 12px auto;
}

.btn-dpad {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-dpad:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-dpad.up { grid-column: 2; grid-row: 1; }
.btn-dpad.left { grid-column: 1; grid-row: 2; }
.btn-dpad.center { grid-column: 2; grid-row: 2; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: var(--accent-blue); }
.btn-dpad.right { grid-column: 3; grid-row: 2; }
.btn-dpad.down { grid-column: 2; grid-row: 3; }

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-group label i {
  width: 14px;
  height: 14px;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(59,130,246,0.5);
  transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* STEP 3 STYLING (CREDENTIALS FORM) */
.form-section-card {
  margin-bottom: 24px;
  position: relative;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group label .required {
  color: var(--danger-color);
}

/* Custom Input stylings */
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=number], textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

/* Force visual uppercase transform on all text fields except email */
input[type=text]:not(#form-email), textarea:not(#form-email) {
  text-transform: uppercase;
}

input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, input[type=date]:focus, input[type=number]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

input[readonly] {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

.input-with-pill {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-pill input {
  padding-right: 110px;
}

.form-pill {
  position: absolute;
  right: 12px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
}

.input-with-action .btn {
  white-space: nowrap;
}

/* STEP 4 STYLING (SETTLEMENT & SIGNATURE) */
.settlement-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.settlement-calc-card {
  display: flex;
  flex-direction: column;
}

.settlement-calc-card h4, .signature-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.converter-box {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.currency-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.currency-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.currency-input-container {
  display: flex;
  align-items: center;
  position: relative;
}

.currency-prefix {
  position: absolute;
  left: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.currency-input-container input {
  padding-left: 36px;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--code-font);
}

.exchange-rate-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  align-self: center;
}

.exchange-rate-pill i {
  width: 16px;
  height: 16px;
}

.rate-editor {
  display: flex;
  align-items: center;
  position: relative;
}

.rate-editor .currency-symbol {
  position: absolute;
  left: 8px;
  font-weight: 700;
}

.rate-editor input {
  width: 80px;
  padding: 4px 8px 4px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: var(--code-font);
  font-weight: 700;
}

.fee-calculation-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(255,255,255,0.01);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
}

.fee-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.fee-item.highlight {
  color: var(--warning-color);
  padding: 6px 0;
  border-bottom: 1px dashed var(--panel-border);
}

.fee-item.final {
  font-size: 1.05rem;
  font-weight: 700;
  padding-top: 8px;
  margin-top: 4px;
}

.fee-item .success { color: var(--accent-emerald); }
.fee-item .danger { color: var(--danger-color); }

.commitment-fields-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Digital Signature pad styles */
.signature-card {
  display: flex;
  flex-direction: column;
}

.signature-pad-container {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #000;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  position: relative;
  overflow: hidden;
}

.signature-pad-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.btn-clear-sig {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(259, 68, 68, 0.15);
  border: 1px solid rgba(259, 68, 68, 0.3);
  color: #f87171;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-clear-sig:hover {
  background: rgba(259, 68, 68, 0.25);
}

/* Custom Checkbox */
.terms-acceptance-checkbox {
  margin: 16px 0;
}

.custom-checkbox {
  display: flex;
  gap: 12px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.custom-checkbox input {
  display: none;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-smooth);
}

.custom-checkbox input:checked + .checkbox-box {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.custom-checkbox input:checked + .checkbox-box::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 2px;
}

.step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 20px;
}

/* TAB 2: RECORDS DIRECTORY DASHBOARD STYLING */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-val {
  font-family: var(--header-font);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 4px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.stat-icon.emerald { background: rgba(16,185,129,0.12); color: var(--accent-emerald); }
.stat-icon.purple { background: rgba(168,85,247,0.12); color: var(--accent-purple); }

.records-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-input-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-group i {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
}

.search-input-group input {
  padding-left: 44px;
}

.export-group {
  display: flex;
  gap: 12px;
}

/* Records Table styling */
.records-table-card {
  padding: 0;
  overflow: hidden;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 24px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--panel-border);
}

td {
  padding: 16px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.empty-table-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.empty-table-state i {
  width: 48px;
  height: 48px;
  color: rgba(255,255,255,0.06);
  margin-bottom: 12px;
}

.empty-table-state span {
  display: block;
  font-size: 0.95rem;
}

.avatar-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--panel-border);
}

.client-name {
  font-weight: 600;
}

.client-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.table-doc-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
}

.table-doc-badge.aadhar { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.table-doc-badge.pan { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); color: #c084fc; }
.table-doc-badge.voter { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #34d399; }

.table-currency {
  font-family: var(--code-font);
  font-weight: 600;
}

/* MODAL DRAWER PORTRAIT STYLING */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.animate-zoom {
  animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--header-font);
  font-size: 1.2rem;
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Certificate Layout Details inside Modal */
.cert-header {
  display: flex;
  gap: 20px;
  border-bottom: 1px dashed var(--panel-border);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.cert-avatar {
  width: 100px;
  height: 125px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--panel-border);
}

.cert-meta-head h4 {
  font-family: var(--header-font);
  font-size: 1.3rem;
  font-weight: 700;
}

.cert-meta-head span {
  font-family: var(--code-font);
  color: var(--accent-blue);
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  font-size: 0.9rem;
}

.cert-grid.full-width-block {
  grid-template-columns: 1fr;
  margin-top: 16px;
  border-top: 1px solid var(--panel-border);
  padding-top: 16px;
}

.cert-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-lbl {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.cert-val {
  font-weight: 500;
}

.cert-sign-block {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed var(--panel-border);
  padding-top: 16px;
}

.cert-sign-img {
  height: 60px;
  object-fit: contain;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  width: 160px;
}

/* Margin Helpers */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }
.w-full { width: 100%; }

/* ========================================================
   RESPONSIVE LAYOUTS & MOBILE WRAPPERS (Android Feel Shell)
   ======================================================== */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 16px;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    border-right: none;
  }
  
  .brand {
    margin-bottom: 0;
  }
  
  .nav-menu {
    flex-direction: row;
    margin-left: auto;
    gap: 8px;
  }
  
  .sidebar-footer {
    display: none;
  }

  .terminal-logs-container {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  
  .scan-grid, .photo-studio-grid, .settlement-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
  
  .commitment-fields-row {
    grid-template-columns: 1fr;
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   ONLINE ONLY SECURE NETWORK OVERLAY
   ======================================================== */
.network-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 13, 16, 0.94);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.network-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.15) !important;
}

.network-icon-container {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

@keyframes pulse-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.2)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.5)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.2)); }
}

/* ========================================================
   LEDGER SYSTEM STYLING
   ======================================================== */
.ledger-list {
  scrollbar-width: thin;
  scrollbar-color: var(--panel-border) transparent;
}

.ledger-list::-webkit-scrollbar {
  width: 4px;
}

.ledger-list::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 2px;
}

.ledger-card {
  transition: var(--transition-smooth);
}

.ledger-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
}

.delete-btn {
  transition: var(--transition-smooth);
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  transform: scale(1.05);
}

/* ========================================================
   AMOUNT IN WORDS BADGE STYLE
   ======================================================== */
.amount-in-words {
  transition: var(--transition-smooth);
  animation: fadeIn 0.3s ease-out;
}

/* Uppercase Transform for inputs except email/files/color */
input:not(#form-email):not([type=file]):not([type=color]),
textarea:not(#form-email) {
  text-transform: uppercase;
}

/* Background Presets Styles */
.bg-picker-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bg-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bg-preset-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--panel-border);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.bg-preset-swatch:hover {
  transform: scale(1.1);
}

.bg-preset-swatch.active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  transform: scale(1.05);
}

.bg-preset-swatch.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 0.85rem;
}

.bg-preset-swatch.swatch-white.active::after {
  color: #111827;
}

.custom-color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type=color] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 0;
}

input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type=color]::-webkit-color-swatch {
  border: 2px solid var(--panel-border);
  border-radius: 50%;
}

/* Age display badge style */
.age-badge {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  font-size: 0.85rem;
  color: #60a5fa;
  font-weight: 500;
  display: inline-block;
  font-family: var(--font-family);
  animation: fadeIn 0.3s ease-out;
}

/* Holographic Compilation Overlay */
.compilation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 24, 0.96);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-family: var(--font-family);
  animation: fadeIn 0.4s ease-out;
}

.compilation-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 480px;
  width: 90%;
  text-align: center;
}

.compilation-spinner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px dashed rgba(59, 130, 246, 0.25);
  border-top: 4px dashed var(--accent-blue);
  animation: rotate 1.5s linear infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compilation-spinner-inner {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px dashed rgba(16, 185, 129, 0.15);
  border-bottom: 3px dashed var(--accent-emerald);
  animation: rotate-reverse 1.2s linear infinite;
  position: absolute;
}

.compilation-icon {
  position: absolute;
  color: var(--accent-blue);
  animation: pulse-glow 2s infinite ease-in-out;
}

.compilation-text-title {
  font-family: var(--header-font);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 8px;
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.compilation-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
}

.compilation-step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  transition: all 0.3s ease;
}

.compilation-step-row.active {
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.04);
}

.compilation-step-row.success {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.03);
}

.compilation-success-card {
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px;
  border: 2px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: blur(20px);
  padding: 30px;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.batch-badge {
  font-family: var(--code-font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.batch-copy-btn {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.batch-copy-btn:hover {
  background: var(--accent-emerald);
  color: #0f172a;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Sidebar Terminal Console Logs Feed */
.terminal-logs-container {
  margin-top: auto;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  font-family: var(--code-font);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.terminal-logs-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.terminal-live-status {
  color: var(--accent-emerald);
  font-weight: 800;
  animation: pulse-glow 2s infinite ease-in-out;
}

.terminal-logs-feed {
  flex: 1;
  overflow-y: auto;
  max-height: 110px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 4px;
  scroll-behavior: smooth;
}

/* Scrollbar styling for feed logs */
.terminal-logs-feed::-webkit-scrollbar {
  width: 3px;
}
.terminal-logs-feed::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.terminal-logs-feed::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.terminal-log-row {
  font-size: 0.65rem;
  line-height: 1.3;
  word-break: break-word;
  animation: fadeIn 0.25s ease-out;
  display: flex;
  gap: 4px;
}

.terminal-log-row.info {
  color: var(--text-secondary);
}

.terminal-log-row.success {
  color: var(--accent-emerald);
}

.terminal-log-row.warning {
  color: var(--warning-color);
}

.terminal-log-row.error {
  color: var(--danger-color);
}

.terminal-log-timestamp {
  color: rgba(96, 165, 250, 0.7);
  flex-shrink: 0;
}

/* Premium Auto Signature Button */
.btn-auto-sign {
  position: absolute;
  right: 85px;
  bottom: 12px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(4px);
}

.btn-auto-sign:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* Real-time search matches highlighting styling */
mark.search-highlight {
  background: rgba(59, 130, 246, 0.25) !important;
  color: #60a5fa !important;
  border-radius: 2px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.5);
}

/* Real-time UX validation states */
input.is-valid,
select.is-valid,
textarea.is-valid {
  border-color: var(--accent-emerald) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2) !important;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger-color) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2) !important;
}

.val-indicator {
  font-size: 0.85rem;
  font-weight: bold;
  margin-left: 6px;
  display: inline-block;
  transition: var(--transition-smooth);
}

/* Table sort headers visual transition */
th.sortable-header {
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

th.sortable-header:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--accent-blue) !important;
}


/* ========================================================
   HIGH-SECURITY CRYPTOGRAPHIC SCANNER ACCESS GATE STYLING
   ======================================================= */
.gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.96) 30%, rgba(2, 6, 23, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.gate-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  padding: 30px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.06) !important;
  animation: fadeIn 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), var(--warning-color), transparent);
}

.gate-security-badge-container {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-shield-ring-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: 50%;
  animation: spin-clockwise 10s linear infinite;
}

.gate-shield-ring-inner {
  position: absolute;
  width: 80%;
  height: 80%;
  border: 1.5px dashed rgba(239, 68, 68, 0.4);
  border-radius: 50%;
  animation: spin-counter 6s linear infinite;
}

.gate-security-icon {
  width: 30px;
  height: 30px;
  color: var(--warning-color);
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
}

.gate-title {
  color: var(--text-primary);
  font-family: var(--header-font);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.gate-subtitle {
  color: var(--warning-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-family: var(--code-font);
  margin-bottom: 16px;
}

.gate-instructions {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.gate-scanner-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto 20px auto;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(59, 130, 246, 0.08);
}

#gate-qr-reader {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

#gate-qr-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.gate-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.8), transparent);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: scanLaser 2.4s infinite ease-in-out;
  z-index: 10;
  pointer-events: none;
}

.gate-controls {
  margin-bottom: 14px;
}

.gate-control-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.gate-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gate-select:focus {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2) !important;
}

.gate-fallback-drawer {
  margin-top: 10px;
}

.gate-divider {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.68rem;
  font-family: var(--code-font);
  font-weight: 700;
  margin: 14px 0;
  text-transform: uppercase;
}

.gate-divider::before,
.gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.gate-divider::before {
  margin-right: 12px;
}

.gate-divider::after {
  margin-left: 12px;
}

.gate-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  text-align: center;
  font-family: var(--code-font);
  outline: none;
  transition: var(--transition-smooth);
}

.gate-input:focus {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2) !important;
}

.gate-download-action {
  margin-top: 16px;
}

.gate-download-link {
  font-size: 0.78rem;
  color: #60a5fa;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.gate-download-link:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.gate-footer {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--code-font);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 20px;
  text-transform: uppercase;
}

.status-locked {
  color: var(--danger-color);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.status-unlocked {
  color: var(--accent-emerald);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Animations */
@keyframes scanLaser {
  0% { top: 0%; opacity: 0.3; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0.3; }
}

@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-counter {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@media (max-width: 1200px) {
  .scan-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .photo-studio-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .settlement-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .form-group.full-width {
    grid-column: span 1 !important;
  }
  .commitment-fields-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 64px !important;
    flex-direction: row !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--sidebar-bg) !important;
    border-top: 1px solid var(--panel-border) !important;
    border-bottom: none !important;
    border-right: none !important;
    z-index: 1000 !important;
    justify-content: space-around !important;
    align-items: center !important;
  }
  
  .brand, .terminal-logs-container, .sidebar-footer {
    display: none !important;
  }
  
  .nav-menu {
    flex-direction: row !important;
    width: 100% !important;
    height: 100% !important;
    margin-left: 0 !important;
    gap: 0 !important;
    justify-content: space-around !important;
    align-items: center !important;
  }
  
  .nav-item {
    position: relative !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    font-size: 0.65rem !important;
    padding: 6px 0 !important;
    flex: 1 !important;
    height: 100% !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
    color: var(--text-secondary) !important;
  }
  
  .nav-item.active {
    color: var(--accent-blue) !important;
    border-top: 2px solid var(--accent-blue) !important;
    padding-top: 4px !important;
    background: rgba(255, 255, 255, 0.02) !important;
  }

  .nav-item i {
    width: 18px !important;
    height: 18px !important;
  }
  
  .nav-item span {
    font-size: 0.65rem !important;
  }
  
  .nav-item .badge {
    position: absolute !important;
    top: 4px !important;
    right: calc(50% - 24px) !important;
    margin-left: 0 !important;
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
    border-radius: 8px !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 16px 16px 80px 16px !important;
  }

  .top-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
  }

  .header-actions {
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .analytics-row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .records-control-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }

  .export-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .export-group .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .step-label {
    display: none !important;
  }
  
  .step-indicator-container {
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
  }
  
  .step-num {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
  }

}

@media (max-width: 480px) {
  .document-select-row {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .doc-pill {
    width: 100% !important;
    padding: 10px !important;
  }

  .camera-control-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .camera-control-row .btn, 
  .camera-control-row .file-upload-wrapper, 
  .camera-control-row .file-upload-wrapper button {
    width: 100% !important;
  }

  .suit-picker {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .suit-pill {
    flex: 1 1 40% !important;
  }

  .compilation-success-card div[style*="display: flex; gap: 16px"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  
  #success-qrcode-container {
    margin: 0 auto !important;
  }
}

/* ========================================================
   BIOMETRIC HUB & EDIT MODE ENHANCED STYLINGS
   ======================================================== */

.bio-slot {
  position: relative;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bio-slot:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.1);
}

.bio-slot.captured {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.02);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.05);
}

.bio-slot.captured:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.12);
}

.bio-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bio-slot:hover .bio-slot-preview img {
  transform: scale(1.05);
}

.bio-slot-status {
  font-family: var(--code-font);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.bio-slot.captured .bio-slot-status {
  color: var(--accent-emerald) !important;
}

/* 10-Fingerprint Buttons */
.bio-finger-btn {
  display: flex !important;
  align-items: center;
  gap: 8px;
  justify-content: flex-start !important;
  width: 100%;
  padding: 10px 14px !important;
  font-weight: 500 !important;
  border: 1px solid var(--panel-border) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  transition: all 0.25s ease !important;
}

.bio-finger-btn:hover {
  border-color: rgba(96, 165, 250, 0.35) !important;
  background: rgba(59, 130, 246, 0.08) !important;
  color: var(--accent-blue) !important;
}

.bio-finger-btn.captured {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: rgba(16, 185, 129, 0.08) !important;
  color: var(--accent-emerald) !important;
}

.finger-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger-color);
  box-shadow: 0 0 6px var(--danger-color);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.bio-finger-btn.captured .finger-status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* Edit Mode Banner */
.edit-mode-banner {
  border-left: 4px solid var(--accent-blue) !important;
  animation: borderPulse 2.5s infinite ease-in-out;
}

@keyframes borderPulse {
  0% { border-left-color: rgba(59, 130, 246, 0.6); }
  50% { border-left-color: rgba(59, 130, 246, 1); filter: drop-shadow(0 0 2px rgba(59,130,246,0.15)); }
  100% { border-left-color: rgba(59, 130, 246, 0.6); }
}

/* Scanner Laser Sweep Animations */
@keyframes laser-sweep {
  0% { top: 0%; opacity: 0.1; }
  10% { opacity: 0.9; }
  90% { opacity: 0.9; }
  100% { top: 100%; opacity: 0.1; }
}

.scanner-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-emerald);
  box-shadow: 0 0 12px 1.5px var(--accent-emerald);
  opacity: 0;
  z-index: 8;
  pointer-events: none;
}

#biometric-laser-frame .scanner-laser {
  animation: laser-sweep 2.5s infinite ease-in-out;
}

/* Shutter flash overlay */
.shutter-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 99;
  transition: opacity 0.05s ease;
}

.shutter-flash.active {
  opacity: 1;
}

/* Custom Highlight style for searched records */
.search-highlight {
  background: rgba(245, 158, 11, 0.2);
  border-radius: 2px;
  color: #fb923c;
  padding: 1px 2px;
}

/* Landscape-only optimization for tablets and pads */
@media (orientation: landscape) {
  .app-container {
    flex-direction: row !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 260px !important;
    height: 100vh !important;
    flex-direction: column !important;
    padding: 24px 16px !important;
    border-right: 1px solid var(--panel-border) !important;
    border-top: none !important;
    border-bottom: none !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    background: var(--sidebar-bg) !important;
    transform: translateZ(0) !important;
  }
  .brand, .terminal-logs-container, .sidebar-footer {
    display: flex !important;
  }
  .terminal-logs-container {
    display: block !important;
    margin-top: 15px !important;
  }
  .nav-menu {
    flex-direction: column !important;
    width: auto !important;
    height: auto !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    margin-bottom: 20px !important;
  }
  .nav-item {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    font-size: 0.95rem !important;
    padding: 12px 16px !important;
    text-align: left !important;
    height: auto !important;
    border-radius: 10px !important;
  }
  .main-content {
    margin-left: 260px !important;
    padding: 32px !important;
  }
  .scan-grid, .photo-studio-grid, .settlement-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
  .form-group.full-width {
    grid-column: span 2 !important;
  }

  /* Auto-fit and spacing compression on shorter landscape screens */
  @media (max-height: 850px) {
    .sidebar {
      padding: 12px 12px !important;
      gap: 8px !important;
    }
    .brand {
      margin-bottom: 12px !important;
      gap: 8px !important;
    }
    .logo-icon {
      width: 32px !important;
      height: 32px !important;
      border-radius: 8px !important;
    }
    .brand-text h1 {
      font-size: 1.05rem !important;
    }
    .brand-text span {
      font-size: 0.7rem !important;
    }
    .nav-menu {
      gap: 4px !important;
      margin-bottom: 8px !important;
    }
    .nav-item {
      padding: 8px 10px !important;
      font-size: 0.82rem !important;
      gap: 8px !important;
    }
    .nav-item i {
      width: 16px !important;
      height: 16px !important;
    }
    .terminal-logs-container {
      margin-top: 4px !important;
      margin-bottom: 6px !important;
      padding: 8px !important;
      gap: 4px !important;
    }
    .terminal-logs-feed {
      max-height: 70px !important;
      min-height: 50px !important;
    }
    .terminal-log-row {
      font-size: 0.6rem !important;
    }
    .sidebar-footer {
      padding: 6px 4px !important;
      font-size: 0.75rem !important;
      margin-top: 0 !important;
    }
    .top-bar {
      margin-bottom: 16px !important;
      padding-bottom: 8px !important;
    }
    .header-info h2 {
      font-size: 1.45rem !important;
    }
    .header-info p {
      font-size: 0.85rem !important;
    }
    .main-content {
      padding: 20px !important;
    }
    .step-indicator-container {
      padding: 10px 16px !important;
      margin-bottom: 16px !important;
    }
  }
}

/* Scroll-isolated table container styling */
.table-container {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#records-table {
  width: 100% !important;
  min-width: 850px !important;
  border-collapse: collapse !important;
}

/* Dossier Cryptographic Verifier and Biometric overlay styles */
#audit-tamper-dropzone {
  border: 2px dashed rgba(16, 185, 129, 0.3) !important;
  border-radius: 8px !important;
  padding: 30px 20px !important;
  text-align: center !important;
  background: rgba(16, 185, 129, 0.02) !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

#audit-tamper-dropzone:hover {
  border-color: var(--accent-emerald) !important;
  background: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15) !important;
}

.success-glow {
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25) !important;
  background: rgba(16, 185, 129, 0.03) !important;
  animation: border-pulse-emerald 2s infinite ease-in-out !important;
}

.danger-glow {
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.25) !important;
  background: rgba(239, 68, 68, 0.03) !important;
  animation: border-pulse-red 1.5s infinite ease-in-out !important;
}

@keyframes border-pulse-emerald {
  0% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); border-color: rgba(16, 185, 129, 0.6); }
  100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); }
}

@keyframes border-pulse-red {
  0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); border-color: rgba(239, 68, 68, 0.6); }
  100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); }
}

/* Biometric scanning animations */
@keyframes pulse-glow {
  0% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.02); opacity: 1; box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(0.98); opacity: 0.8; }
}

#liveness-telemetry-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9;
}

/* Biometrics Workspace grids and alignments */
.palm-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.eyes-face-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.palm-slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fingerprint-hands-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  padding: 10px 0;
}

.workspace-buttons-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Media query adaptations for biometrics layouts */
@media (max-width: 1024px) {
  .palm-workspace-grid {
    grid-template-columns: 1fr;
  }
  .eyes-face-workspace-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .eyes-face-workspace-grid {
    grid-template-columns: 1fr;
  }
  .palm-slots-grid {
    grid-template-columns: 1fr;
  }
  .fingerprint-hands-row {
    flex-direction: column;
    align-items: stretch;
  }
  .workspace-buttons-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .workspace-buttons-row button {
    width: 100%;
  }
}
