/**
 * Official Original Format ID Card Generator & Studio Stylesheet
 * Supports: Aadhaar Card, PAN Card, Voter ID Card (e-EPIC)
 * High-DPI CR80 PVC Standard (85.6mm x 54mm) & A4 Print Sheet Scaling
 */

:root {
  --primary: #1e40af;
  --primary-dark: #0f172a;
  --accent-gold: #f59e0b;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  --bg-slate: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

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

body.official-id-body {
  background-color: var(--bg-slate);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Freeze entire window so outer page doesn't scroll */
}

/* Glass Navbar */
.glass-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.5rem 0;
}

.glass-navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand-logo {
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.3);
}

.brand-title-main {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.brand-title-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-nav-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-nav-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-nav-primary {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.btn-nav-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
}

/* App Main Container */
.id-app-workspace {
  flex: 1;
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: calc(100vh - 58px);
  overflow: hidden;
  box-sizing: border-box;
}

/* Sidebar Form Container */
.id-sidebar {
  width: 420px;
  min-width: 360px;
  max-width: 460px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
  z-index: 20;
  flex-shrink: 0;
}

.id-sidebar::-webkit-scrollbar {
  width: 5px;
}
.id-sidebar::-webkit-scrollbar-track {
  background: #f8fafc;
}
.id-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.sidebar-header-box {
  padding: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.card-selector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.card-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.card-tab-btn span.tab-icon {
  font-size: 1.25rem;
  margin-bottom: 3px;
}

.card-tab-btn:hover {
  background: #ffffff;
  color: #0f172a;
}

.card-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  border-color: #bfdbfe;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15);
}

.card-tab-btn.active span.tab-icon {
  transform: scale(1.1);
}

/* Sidebar Form Content */
.sidebar-form-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}

.form-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.section-legend {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.65rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  justify-content: space-between;
}

.form-group label span.sub-lbl {
  color: #94a3b8;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 55px;
  line-height: 1.4;
}

/* Upload Dropzone Boxes in Sidebar */
.upload-mini-dropzone {
  border: 1.5px dashed #93c5fd;
  background: #eff6ff;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-mini-dropzone:hover {
  background: #dbeafe;
  border-color: #2563eb;
}

.upload-mini-thumb {
  width: 36px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.upload-btn-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: #1e40af;
}

/* Action Button Toolbar in Sidebar Bottom */
.sidebar-bottom-actions {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.05);
}

.btn-sample-autofill {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #334155;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sample-autofill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-export-primary {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-export-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}

/* =========================================================================
   MAIN STAGE / PREVIEW AREA
   ========================================================================= */
.id-preview-stage {
  flex: 1;
  background: #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 1rem 3rem 1rem;
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

/* Top View Mode Switcher in Stage - Frozen / Sticky at Top */
.stage-top-controls {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  margin-bottom: 0.85rem;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(203, 213, 225, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  padding: 6px 12px !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

.preview-mode-pills {
  display: flex;
  background: #ffffff;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
  gap: 4px;
}

.view-pill-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-pill-btn.active {
  background: #1e40af;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.stage-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-action-btn {
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: #f8fafc;
  color: #2563eb;
  border-color: #93c5fd;
}

/* Real-time Hindi Transliteration & Suggestions Ribbon */
.hindi-suggestions-box {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
  align-items: center !important;
  gap: 4px 6px !important;
  margin-top: 4px !important;
  padding: 4px 6px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  white-space: normal !important;
  max-width: 100% !important;
  min-height: 28px !important;
  box-sizing: border-box !important;
}

.hindi-suggestions-box::-webkit-scrollbar {
  display: none !important;
}

.hindi-suggestion-chip {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 2px 7px !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  color: #1e3a8a !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  transition: all 0.15s ease !important;
}

.hindi-suggestion-chip:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
}

.hindi-suggestion-chip.active {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #15803d !important;
}

/* Interactive Guardian Relation Prefix Selector (S/O, C/O, W/O, D/O, None) */
.guardian-prefix-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.45rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 8px;
}

.guardian-prefix-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.guardian-pill {
  padding: 4px 2px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  user-select: none;
  text-align: center;
}

.guardian-pill:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
  transform: translateY(-1px);
}

.guardian-pill.active {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.guardian-pill.pill-none {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.guardian-pill.pill-none.active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

/* Dual Card Display Box (Front & Back View) - Frozen in Place */
.dual-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 920px;
}

@media (min-width: 900px) {
  .dual-card-container.side-by-side-layout {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

.card-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.card-label-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: #ffffff;
  padding: 3px 12px;
  border-radius: 9999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

/* CR80 Standard Official Card Canvas Sizing (85.6mm x 54mm -> Ratio ~ 1.585) */
.official-card-frame {
  width: 380px;
  height: 240px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  border: 1px solid #94a3b8;
  transform: scale(var(--card-scale, 1));
  transform-origin: top center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.official-card-frame:hover {
  transform: scale(var(--card-scale, 1)) translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
}

/* =========================================================================
   1. ORIGINAL AADHAAR CARD TEMPLATE STYLING (UIDAI OFFICIAL PVC FORMAT)
   ========================================================================= */
.card-aadhaar-front {
  background: #ffffff !important;
  background-image: none !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px 6px 6px;
  position: relative;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  overflow: hidden;
}

.card-aadhaar-front.format-pvc {
  background: linear-gradient(180deg, #eecaa6 0%, #f3d7b8 38%, #d8eadc 72%, #b5d8bd 100%) !important;
  background-image: 
    radial-gradient(circle at 70% 48%, rgba(175, 125, 80, 0.16) 0%, rgba(85, 155, 105, 0.12) 50%, transparent 75%),
    linear-gradient(180deg, #eecaa6 0%, #f3d7b8 38%, #d8eadc 72%, #b5d8bd 100%) !important;
  border: 1px solid #b6a089;
}

/* Authentic Nested Clover-Rosette Guilloche Security Watermark - Front (Exact Photo Match) */
.card-aadhaar-front::before {
  display: none !important;
}

.card-aadhaar-front.format-pvc::before {
  display: block !important;
  content: '';
  position: absolute;
  top: 4%;
  right: -6%;
  width: 290px;
  height: 240px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320'%3E%3Cdefs%3E%3Cg id='cloverWave'%3E%3Cpath d='M160 160 C110 110 90 60 160 20 C230 60 210 110 160 160 Z' fill='none' stroke='%2363523e' stroke-width='0.9'/%3E%3Cpath d='M160 160 C118 118 100 72 160 36 C220 72 202 118 160 160 Z' fill='none' stroke='%23487053' stroke-width='0.8'/%3E%3Cpath d='M160 160 C126 126 112 84 160 52 C208 84 194 126 160 160 Z' fill='none' stroke='%2363523e' stroke-width='0.7'/%3E%3Cpath d='M160 160 C134 134 122 96 160 68 C198 96 186 134 160 160 Z' fill='none' stroke='%23487053' stroke-width='0.6'/%3E%3Cpath d='M160 160 C142 142 132 108 160 84 C188 108 178 142 160 160 Z' fill='none' stroke='%2363523e' stroke-width='0.5'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23cloverWave'/%3E%3Cuse href='%23cloverWave' transform='rotate(90 160 160)'/%3E%3Cuse href='%23cloverWave' transform='rotate(180 160 160)'/%3E%3Cuse href='%23cloverWave' transform='rotate(270 160 160)'/%3E%3Cuse href='%23cloverWave' transform='rotate(45 160 160)' opacity='0.85'/%3E%3Cuse href='%23cloverWave' transform='rotate(135 160 160)' opacity='0.85'/%3E%3Cuse href='%23cloverWave' transform='rotate(225 160 160)' opacity='0.85'/%3E%3Cuse href='%23cloverWave' transform='rotate(315 160 160)' opacity='0.85'/%3E%3Cpath d='M160 10 C240 10 310 80 310 160 C310 240 240 310 160 310 C80 310 10 240 10 160 C10 80 80 10 160 10 Z' fill='none' stroke='%2363523e' stroke-width='0.8' stroke-dasharray='4,3'/%3E%3Ccircle cx='160' cy='160' r='135' fill='none' stroke='%23487053' stroke-width='0.7'/%3E%3Ccircle cx='160' cy='160' r='120' fill='none' stroke='%2363523e' stroke-width='0.7'/%3E%3Ccircle cx='160' cy='160' r='105' fill='none' stroke='%23487053' stroke-width='0.6'/%3E%3Ccircle cx='160' cy='160' r='90' fill='none' stroke='%2363523e' stroke-width='0.6'/%3E%3Ccircle cx='160' cy='160' r='75' fill='none' stroke='%23487053' stroke-width='0.5'/%3E%3Ccircle cx='160' cy='160' r='60' fill='none' stroke='%2363523e' stroke-width='0.5'/%3E%3Ccircle cx='160' cy='160' r='45' fill='none' stroke='%23487053' stroke-width='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  opacity: var(--watermark-opacity, var(--adh-watermark-opacity, 0.36)) !important;
}

/* Aadhaar Top Header Area */
.aadhaar-header-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  position: relative;
  z-index: 5;
}

.aadhaar-emblem-left {
  height: 30px;
  width: auto;
  object-fit: contain;
  filter: contrast(130%);
}

/* Authentic Photorealistic Paint-Brush Flag Banner */
.aadhaar-tricolor-banner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  gap: 2px;
}

.adh-brush-stripe {
  width: 100%;
  max-width: 232px;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  background-position: left center !important;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.adh-brush-saffron {
  background-image: url("./aadhaar-brush-saffron.png") !important;
  height: 15px;
  padding-left: 28px;
}

.adh-brush-green {
  background-image: url("./aadhaar-brush-green.png") !important;
  height: 14px;
  padding-left: 14px;
}

.adh-brush-text-hi {
  font-family: 'Arial Unicode MS', 'Nirmala UI', 'Mangal', 'Noto Sans Devanagari', -apple-system, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
}

.adh-brush-text-en {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-size: 0.51rem;
  font-weight: 600;
  color: #000000;
  letter-spacing: 0.25px;
  line-height: 1;
  white-space: nowrap;
}

/* Aadhaar Back Header Brush Banner (Longer Text Accommodation) */
.card-aadhaar-back .adh-brush-stripe {
  max-width: 246px;
}

.card-aadhaar-back .adh-brush-saffron {
  padding-left: 8px;
}

.card-aadhaar-back .adh-brush-green {
  padding-left: 8px;
}

.card-aadhaar-back .adh-brush-text-hi {
  font-size: 0.49rem;
  letter-spacing: 0.1px;
}

.card-aadhaar-back .adh-brush-text-en {
  font-size: 0.44rem;
  letter-spacing: 0.05px;
}

/* Aadhaar Logo Box Right */
.aadhaar-logo-box-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.aadhaar-logo-right-img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.aadhaar-logo-label-hi {
  font-size: 0.54rem;
  font-weight: 900;
  color: #dc2626;
  line-height: 1;
  margin-top: 1px;
}

/* Aadhaar Body Content Area */
.aadhaar-body-area {
  display: flex;
  margin-top: 8px;
  margin-bottom: 2px;
  padding: 0 0 0 16px;
  align-items: flex-start;
  position: relative;
  z-index: 5;
  gap: 6px;
}

/* Left Vertical Issue Date — Bottom-to-Top along photo area, strictly above bottom line */
.aadhaar-vertical-issue-date {
  position: absolute;
  left: 1px;
  top: 40px;
  bottom: 92px;
  width: 12px;
  transform: rotate(180deg);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 6px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.2px;
  line-height: 12px;
  white-space: nowrap;
  user-select: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Photo Box */
.aadhaar-photo-box {
  width: 76px;
  height: 92px;
  border-radius: 3px;
  border: 1px solid #94a3b8;
  background: #ffffff;
  padding: 1.5px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  align-self: flex-start;
}

.aadhaar-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

/* Details Column - Top Aligned with Photo */
.aadhaar-details-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  padding-left: 4px;
  padding-top: 1px;
}

.aadhaar-text-name-main {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.aadhaar-text-name-hi-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.1;
}

.aadhaar-text-meta-row {
  font-size: 0.62rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

/* Official Aadhaar Disclaimer / Verification Notice (Exact Match to User Photo) */
.aadhaar-disclaimer-notice-box {
  margin-top: 3px;
  margin-bottom: 1px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ef4444;
  border-radius: 2px;
  font-size: 0.39rem;
  line-height: 1.20;
  color: #0f172a;
  width: 100%;
  max-width: 275px;
  box-sizing: border-box;
}

.adh-notice-hi {
  font-size: 0.41rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5px;
}

.adh-notice-hi-sub {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.38rem;
  line-height: 1.18;
  margin: 0.5px 0 1px 0;
}

.adh-notice-en {
  font-size: 0.38rem;
  color: #1e293b;
  line-height: 1.18;
}

.adh-notice-en strong {
  font-weight: 800;
  color: #0f172a;
}

/* Right Column: Micro Photo & 3D Hologram Sticker */
.aadhaar-right-security-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 94px;
  width: 58px;
  flex-shrink: 0;
}

/* Micro / Ghost Photo */
.aadhaar-micro-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aadhaar-micro-photo-img {
  width: 28px;
  height: 34px;
  border-radius: 2px;
  object-fit: cover;
  border: 0.5px solid #94a3b8;
  background: #ffffff;
}

.aadhaar-micro-num-text {
  font-family: 'Courier New', monospace;
  font-size: 0.36rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 0.2px;
  margin-top: 1px;
}

/* 3D Metallic Hologram Sticker Simulation (Exact Photo Match) */
.aadhaar-hologram-seal {
  width: 52px;
  height: 38px;
  border-radius: 4px;
  background: linear-gradient(135deg, #d8dee8 0%, #cbd5e1 25%, #f8fafc 45%, #94a3b8 65%, #e2e8f0 85%, #cbd5e1 100%);
  border: 1px solid #64748b;
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.9), 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aadhaar-hologram-inner-graphic {
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 44'%3E%3Cpath d='M8 9 L12 7 L15 9 L16 13 L14 16 L13 18 L10 17 L8 14 Z' fill='%23d97706' opacity='0.9' stroke='%23b45309' stroke-width='0.5'/%3E%3Cpath d='M30 25 C22 25 18 18 18 13 C18 5 24 2 30 2 C36 2 42 5 42 13 C42 18 38 25 30 25 Z' fill='none' stroke='%23334155' stroke-width='1.8'/%3E%3Ccircle cx='30' cy='13' r='5.5' fill='none' stroke='%231e293b' stroke-width='1.2'/%3E%3Ccircle cx='30' cy='13' r='2.5' fill='%23475569'/%3E%3Cpath d='M20 5 L23 8 M40 5 L37 8 M15 13 L19 13 M45 13 L41 13' stroke='%23334155' stroke-width='1.2'/%3E%3Crect x='12' y='26' width='36' height='4' fill='%23cbd5e1' stroke='%2394a3b8' stroke-width='0.5'/%3E%3Cpattern id='dots' width='3' height='3' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='1.5' cy='1.5' r='0.9' fill='%23475569'/%3E%3C/pattern%3E%3Crect x='4' y='31' width='52' height='11' fill='url(%23dots)' opacity='0.75'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* Aadhaar Bottom Number Section */
.aadhaar-number-section {
  text-align: center;
  position: relative;
  z-index: 5;
  margin-top: 1px;
}

.aadhaar-number-main-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.18rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 2.2px;
  line-height: 1.1;
  text-shadow: 0.5px 0.5px 0px rgba(0,0,0,0.1);
}

/* Fine Red-Orange Divider Line (Exact Match to Photo) */
.aadhaar-red-divider-line {
  width: calc(100% + 14px);
  margin: 1.5px -7px 2px -7px;
  height: 1.2px;
  background-color: #d94826;
  position: relative;
  z-index: 5;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.card-aadhaar-back:not(.format-classic) .aadhaar-red-divider-line {
  display: none !important;
}

/* Bottom Official Slogan */
.aadhaar-bottom-slogan {
  text-align: center;
  font-size: 0.64rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
  line-height: 1.15;
  position: relative;
  z-index: 5;
}

.aadhaar-bottom-slogan span.adh-slogan-red {
  color: #d94826;
  font-weight: 900;
}

.aadhaar-bottom-slogan span.adh-slogan-black {
  color: #0f172a;
  font-weight: 800;
}

/* =========================================================================
   1.2 AADHAAR BACK SIDE (EXACT ORIGINAL PVC FORMAT)
   ========================================================================= */
.card-aadhaar-back {
  background: #ffffff !important;
  background-image: none !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px 0 6px;
  position: relative;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  overflow: hidden;
}

.card-aadhaar-back.format-pvc {
  background: linear-gradient(180deg, #eecaa6 0%, #f3d7b8 38%, #d8eadc 72%, #b5d8bd 100%) !important;
  background-image: 
    radial-gradient(circle at 35% 50%, rgba(175, 125, 80, 0.16) 0%, rgba(85, 155, 105, 0.12) 50%, transparent 75%),
    linear-gradient(180deg, #eecaa6 0%, #f3d7b8 38%, #d8eadc 72%, #b5d8bd 100%) !important;
  border: 1px solid #b6a089;
}

/* Authentic Nested Clover-Rosette Guilloche Security Watermark - Back (Exact Photo Match) */
.card-aadhaar-back::before {
  display: none !important;
}

.card-aadhaar-back.format-pvc::before {
  display: block !important;
  content: '';
  position: absolute;
  top: 4%;
  left: 0%;
  width: 290px;
  height: 240px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320'%3E%3Cdefs%3E%3Cg id='cloverWaveB'%3E%3Cpath d='M160 160 C110 110 90 60 160 20 C230 60 210 110 160 160 Z' fill='none' stroke='%23487053' stroke-width='0.9'/%3E%3Cpath d='M160 160 C118 118 100 72 160 36 C220 72 202 118 160 160 Z' fill='none' stroke='%2363523e' stroke-width='0.8'/%3E%3Cpath d='M160 160 C126 126 112 84 160 52 C208 84 194 126 160 160 Z' fill='none' stroke='%23487053' stroke-width='0.7'/%3E%3Cpath d='M160 160 C134 134 122 96 160 68 C198 96 186 134 160 160 Z' fill='none' stroke='%2363523e' stroke-width='0.6'/%3E%3Cpath d='M160 160 C142 142 132 108 160 84 C188 108 178 142 160 160 Z' fill='none' stroke='%23487053' stroke-width='0.5'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23cloverWaveB'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(90 160 160)'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(180 160 160)'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(270 160 160)'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(45 160 160)' opacity='0.85'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(135 160 160)' opacity='0.85'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(225 160 160)' opacity='0.85'/%3E%3Cuse href='%23cloverWaveB' transform='rotate(315 160 160)' opacity='0.85'/%3E%3Cpath d='M160 10 C240 10 310 80 310 160 C310 240 240 310 160 310 C80 310 10 240 10 160 C10 80 80 10 160 10 Z' fill='none' stroke='%23487053' stroke-width='0.8' stroke-dasharray='4,3'/%3E%3Ccircle cx='160' cy='160' r='135' fill='none' stroke='%2363523e' stroke-width='0.7'/%3E%3Ccircle cx='160' cy='160' r='120' fill='none' stroke='%23487053' stroke-width='0.7'/%3E%3Ccircle cx='160' cy='160' r='105' fill='none' stroke='%2363523e' stroke-width='0.6'/%3E%3Ccircle cx='160' cy='160' r='90' fill='none' stroke='%23487053' stroke-width='0.6'/%3E%3Ccircle cx='160' cy='160' r='75' fill='none' stroke='%2363523e' stroke-width='0.5'/%3E%3Ccircle cx='160' cy='160' r='60' fill='none' stroke='%23487053' stroke-width='0.5'/%3E%3Ccircle cx='160' cy='160' r='45' fill='none' stroke='%2363523e' stroke-width='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  opacity: var(--adh-watermark-opacity, 0.36) !important;
}

/* Aadhaar Back Body Area */
.aadhaar-back-body {
  display: flex;
  padding: 2px 2px 2px 16px;
  align-items: center;
  position: relative;
  z-index: 5;
  gap: 4px;
}

/* Left Vertical Print Date — Bottom-to-Top along body area, strictly above bottom line */
.aadhaar-vertical-print-date {
  position: absolute;
  left: 1px;
  top: 40px;
  bottom: 92px;
  width: 12px;
  transform: rotate(180deg);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 6px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.2px;
  line-height: 12px;
  white-space: nowrap;
  user-select: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Address Column on Back */
.aadhaar-back-address-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-left: 2px;
  padding-right: 4px;
}

.aadhaar-back-address-text {
  font-size: 0.61rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.28;
  letter-spacing: 0.1px;
}

.aadhaar-back-address-text strong {
  font-weight: 900;
  color: #0f172a;
}

/* Back QR Code Box (Large & Clean without Outer Border) */
.aadhaar-back-qr-box {
  width: 96px;
  height: 96px;
  background: transparent;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  flex-shrink: 0;
}

.aadhaar-back-qr-box canvas, .aadhaar-back-qr-box img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Back Bottom Number Section */
.aadhaar-back-number-section {
  text-align: center;
  position: relative;
  z-index: 5;
  margin-top: 1px;
  margin-bottom: 2px;
}

.aadhaar-back-number-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.18rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 2.2px;
  line-height: 1.1;
  text-shadow: 0.5px 0.5px 0px rgba(0,0,0,0.1);
}

/* Back Official 3-Column Footer */
.aadhaar-back-footer-strip {
  background: #c5dcce;
  border-top: 1px solid #9bb8a6;
  margin: 0 -8px 0 -6px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.58rem;
  font-weight: 800;
  color: #0f172a;
  position: relative;
  z-index: 5;
}

.aadhaar-footer-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.aadhaar-footer-icon {
  font-size: 0.72rem;
}

/* =========================================================================
   1.1 AADHAAR CLASSIC VECTOR / E-AADHAAR CUTOUT FORMAT STYLING
   ========================================================================= */
.card-aadhaar-front.format-classic,
.card-aadhaar-back.format-classic {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cbd5e1;
  padding: 6px 8px 0px 8px !important;
  justify-content: space-between;
  overflow: hidden;
}

.card-aadhaar-front.format-classic::before,
.card-aadhaar-back.format-classic::before {
  display: none !important;
}

/* Classic Front QR code column */
.aadhaar-classic-front-qr-col {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 94px;
  flex-shrink: 0;
  padding-left: 2px;
}

.aadhaar-classic-front-qr-box {
  width: 74px;
  height: 74px;
  background: transparent;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aadhaar-classic-front-qr-box canvas,
.aadhaar-classic-front-qr-box img,
.aadhaar-classic-front-qr-box svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}

/* Classic Stacked Address & Huge Back QR Code Layout */
.aadhaar-classic-back-body {
  display: flex;
  margin-top: 0px;
  margin-bottom: 2px;
  padding: 0 2px 0 16px;
  align-items: center;
  position: relative;
  z-index: 5;
  gap: 4px;
  flex: 1;
}

.aadhaar-classic-stacked-address {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0 4px 0 1px;
  margin: 0;
  transform: translateY(-9px);
}

.aadhaar-classic-addr-block {
  font-size: 0.49rem;
  line-height: 1.20;
  color: #1e293b;
  word-break: break-word;
}

.aadhaar-classic-addr-block strong {
  font-size: 0.55rem;
  font-weight: 900;
  color: #0f172a;
  display: block;
}

/* Huge Back QR Code Box (Exact Photo Match - Clean QR without Outer Border) */
.aadhaar-classic-back-qr-col {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aadhaar-classic-back-qr-box {
  width: 108px;
  height: 108px;
  background: transparent;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aadhaar-classic-back-qr-box canvas,
.aadhaar-classic-back-qr-box img,
.aadhaar-classic-back-qr-box svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}

/* Virtual ID (VID) & Dotted Separator Line */
.aadhaar-vid-dotted-line {
  width: 160px;
  margin: 1px auto;
  border-bottom: 1px dotted #475569;
}

.aadhaar-vid-text {
  font-family: 'Courier New', monospace;
  font-size: 0.58rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.8px;
  line-height: 1.1;
  margin-top: 1px;
}

/* Identical Number row for both Front & Back in Classic format */
.card-aadhaar-front.format-classic .aadhaar-number-section,
.card-aadhaar-back.format-classic .aadhaar-back-number-section {
  text-align: center;
  margin-top: auto !important;
  margin-bottom: 2px !important;
  padding: 0 !important;
  position: relative;
  z-index: 5;
}

.card-aadhaar-front.format-classic .aadhaar-number-main-text,
.card-aadhaar-back.format-classic .aadhaar-back-number-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.22rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: 2.4px !important;
  line-height: 1.1 !important;
  text-shadow: none !important;
}

/* Identical Edge-to-Edge Red Separator Line on Both Front & Back */
.card-aadhaar-front.format-classic .aadhaar-red-divider-line,
.card-aadhaar-back.format-classic .aadhaar-red-divider-line {
  width: calc(100% + 16px) !important;
  margin: 1px -8px 0px -8px !important;
  height: 2px !important;
  min-height: 2px !important;
  background-color: #d9381e !important;
  display: block !important;
  position: relative;
  z-index: 10;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Classic Front Slogan (आधार — आम आदमी का अधिकार - Extra Big & Extra Bold) */
.card-aadhaar-front.format-classic .aadhaar-bottom-slogan {
  height: 28px !important;
  min-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.94rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: 0.5px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  position: relative;
  z-index: 5;
}

.card-aadhaar-front.format-classic .aadhaar-bottom-slogan .adh-slogan-red {
  color: #d9381e !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  margin-left: 4px !important;
  margin-right: 0 !important;
}

.card-aadhaar-front.format-classic .aadhaar-bottom-slogan .adh-slogan-black,
.card-aadhaar-front.format-classic .aadhaar-bottom-slogan .adh-slogan-text {
  color: #0f172a !important;
  font-size: 0.94rem !important;
  font-weight: 900 !important;
}

/* Classic Back 3-Icons Footer Bar (Same exact 28px height & alignment as Front Slogan) */
.card-aadhaar-back.format-classic .aadhaar-classic-back-footer {
  height: 28px !important;
  min-height: 28px !important;
  background: #ffffff !important;
  border-top: none !important;
  margin: 0 -8px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 0.54rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  position: relative;
  z-index: 5;
}

/* =========================================================================
   2. ORIGINAL PAN CARD TEMPLATE STYLING (AUTHENTIC MODERN SKY-BLUE PVC FORMAT)
   ========================================================================= */
.card-pan-front {
  background: #d6eaff !important;
  background-image: 
    radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.45) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(186, 224, 253, 0.5) 0%, transparent 50%),
    linear-gradient(135deg, #cde6fb 0%, #e1f1fe 40%, #cbe5fa 75%, #b5dbf7 100%) !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px 6px 8px;
  position: relative;
  border: 1px solid #93c5fd;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  box-sizing: border-box;
}

/* Subtle Security Guilloche Rosette Watermark Pattern in Cyan/Blue */
.card-pan-front::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Ccircle cx='120' cy='120' r='105' fill='none' stroke='%230284c7' stroke-width='0.6' opacity='0.16' stroke-dasharray='4,2'/%3E%3Ccircle cx='120' cy='120' r='90' fill='none' stroke='%231e40af' stroke-width='0.5' opacity='0.14'/%3E%3Ccircle cx='120' cy='120' r='75' fill='none' stroke='%230284c7' stroke-width='0.5' opacity='0.14'/%3E%3Ccircle cx='120' cy='120' r='60' fill='none' stroke='%231e40af' stroke-width='0.4' opacity='0.12'/%3E%3Ccircle cx='120' cy='120' r='45' fill='none' stroke='%230284c7' stroke-width='0.4' opacity='0.10'/%3E%3Cpath d='M120 15 L120 225 M15 120 L225 120 M45 45 L195 195 M45 195 L195 45' stroke='%230284c7' stroke-width='0.3' opacity='0.10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}

/* ---- Header: 3 parts (Left: ITD, Center: Emblem, Right: GOI) ---- */
.pan-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
  padding: 0 2px 2px 2px;
}

.pan-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.pan-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pan-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.pan-header-title-hi {
  font-size: 0.62rem;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.pan-header-title-en {
  font-size: 0.48rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.pan-emblem-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: contrast(120%);
}

/* ---- Body Grid Layout ---- */
.pan-body-grid {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  position: relative;
  z-index: 5;
  flex: 1;
  margin-top: 1px;
}

/* Left Column: Photo (Top) + Details (Bottom) */
.pan-left-col {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.pan-photo-container {
  width: 66px;
  height: 78px;
  border: 1px solid #475569;
  border-radius: 2px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 2px;
}

.pan-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pan-details-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 1px;
}

.pan-field-unit {
  display: flex;
  flex-direction: column;
}

.pan-lbl-dual {
  font-size: 0.40rem;
  font-weight: 800;
  color: #334155;
  line-height: 1;
}

.pan-val-text {
  font-size: 0.58rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  word-break: break-word;
}

/* Center Column: PAN Number Box (Top) + Signature Area (Bottom) */
.pan-center-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-top: 3px;
}

.pan-pan-number-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pan-pan-title-hi {
  font-size: 0.46rem;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1.1;
}

.pan-pan-title-en {
  font-size: 0.42rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.1;
}

.pan-pan-number-digits {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.94rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 1.5px;
  line-height: 1.2;
  margin-top: 2px;
}

.pan-signature-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  margin-bottom: 2px;
}

.pan-signature-box {
  width: 100%;
  height: 34px;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pan-signature-img {
  max-width: 95%;
  max-height: 32px;
  object-fit: contain;
}

.pan-sign-caption-en {
  font-size: 0.36rem;
  font-weight: 800;
  color: #475569;
  line-height: 1;
  letter-spacing: 0.2px;
  margin-top: 1px;
}

.pan-sign-caption-hi {
  font-size: 0.34rem;
  font-weight: 700;
  color: #475569;
  line-height: 1;
}

/* Right Column: Large QR Code + Serial / Issue Date Stamp */
.pan-right-col {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2px;
}

.pan-qr-box {
  width: 96px;
  height: 96px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 3px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pan-qr-box canvas, .pan-qr-box img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.pan-serial-stamp {
  font-size: 0.40rem;
  font-weight: 700;
  color: #475569;
  margin-top: 5px;
  font-family: 'Courier New', monospace;
  text-align: right;
  width: 100%;
  padding-right: 2px;
}

/* =========================================================================
   2. ORIGINAL PAN CARD REVERSE SIDE (PROTEAN / NSDL OFFICIAL PVC STANDARD)
   ========================================================================= */
.card-pan-back {
  background: #dff0ff !important;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.08) 0%, transparent 60%),
    linear-gradient(135deg, #d6eaff 0%, #e2f1ff 50%, #cde6fb 100%) !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  border: 1px solid #7dd3fc;
  box-sizing: border-box;
}

.card-pan-back::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 240'%3E%3Cdefs%3E%3Cpattern id='panWaveBack' width='38' height='24' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 12 Q9.5 0 19 12 T38 12' fill='none' stroke='%230284c7' stroke-width='0.4' opacity='0.25'/%3E%3Cpath d='M0 6 Q9.5 18 19 6 T38 6' fill='none' stroke='%230284c7' stroke-width='0.3' opacity='0.18'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23panWaveBack)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.pan-back-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #0284c7;
  padding-bottom: 3px;
  margin-bottom: 2px;
}

.pan-back-header-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pan-back-emblem-img {
  height: 20px;
  width: auto;
}

.pan-back-header-title {
  display: flex;
  flex-direction: column;
}

.pan-back-dept-hi {
  font-size: 0.52rem;
  font-weight: 900;
  color: #0c4a6e;
  line-height: 1.1;
}

.pan-back-dept-en {
  font-size: 0.44rem;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.4px;
  line-height: 1.1;
}

.pan-back-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 2px;
  gap: 3px;
}

.pan-back-notice-box {
  background: rgba(255, 255, 255, 0.75);
  border: 0.8px solid #bae6fd;
  border-radius: 4px;
  padding: 4px 6px;
  backdrop-filter: blur(2px);
}

.pan-back-notice-title {
  font-size: 0.40rem;
  font-weight: 800;
  color: #0c4a6e;
  line-height: 1.2;
}

.pan-back-address {
  font-size: 0.38rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
  margin-top: 1px;
}

.pan-back-rules {
  font-size: 0.36rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
}

.pan-back-barcode-container {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border: 1px solid #7dd3fc;
  border-radius: 4px;
  padding: 2px 8px 2px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1);
}

.pan-back-barcode-graphic {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #0c4a6e;
  line-height: 1;
}

.pan-back-barcode-num {
  font-family: 'Courier New', monospace;
  font-size: 0.56rem;
  font-weight: 900;
  color: #0c4a6e;
  letter-spacing: 2.5px;
}

.pan-back-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.34rem;
  font-weight: 700;
  color: #0369a1;
  padding-top: 2px;
  border-top: 0.5px solid #7dd3fc;
}

/* =========================================================================
   3. ORIGINAL NATIONAL e-EPIC COLOR VOTER ID CARD (ECI OFFICIAL NEW STANDARD)
   Matching User Reference Photo (media_1789302695465.jpg) Exactly
   ========================================================================= */

/* Front Card Substrate & Vibrant Security Wash (Exact Match to User Reference Photo media_1789364088931.jpg) */
.card-voter-front {
  background-color: #ffffff !important;
  background-image: 
    /* 1. Organic Flowing Saffron Guilloche Waves from Top-Right (Authentic Vector SVG) */
    url("./images/voter-front-waves.svg"),
    /* 2. Top-Left Lavender / Pink Rosette Under Ashoka Emblem (#F4DEF3 / #E5CBE4 / #ec4899) */
    repeating-radial-gradient(circle at 35px 22px, transparent 0px, transparent 3.5px, rgba(236, 72, 153, 0.18) 4px, transparent 4.5px, transparent 7.5px, rgba(216, 180, 254, 0.16) 8px, transparent 8.5px),
    radial-gradient(ellipse 140px 120px at 12% 16%, rgba(236, 72, 153, 0.35) 0%, rgba(216, 180, 254, 0.28) 45%, transparent 75%),
    /* 3. Photo Perimeter Cyan / Ice Blue Aura */
    radial-gradient(ellipse 150px 170px at 22% 64%, rgba(56, 189, 248, 0.42) 0%, rgba(125, 211, 252, 0.25) 45%, transparent 70%),
    /* 4. Bottom-Left Mint / Olive Green Security Wash (#84cc16 / #a3e635 / #d9f99d) */
    radial-gradient(ellipse 190px 115px at 4% 98%, rgba(132, 204, 22, 0.42) 0%, rgba(163, 230, 53, 0.28) 35%, rgba(217, 249, 157, 0.15) 60%, transparent 80%),
    /* 5. Delicate Warm White Base */
    linear-gradient(135deg, #fffcf7 0%, #ffffff 50%, #fdfdfd 100%) !important;
  background-size: cover, auto, auto, auto, auto, auto;
  background-repeat: no-repeat;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 8px 3px 8px;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

/* Back Card Substrate & Gradients (Top-Left Lavender Curves + Sweeping Saffron Vector Footer Wave) */
.card-voter-back {
  background-color: #ffffff !important;
  background-image: 
    /* 1. Top-Left Lavender / Purple Security Curves (#d8b4fe / #c084fc) */
    radial-gradient(ellipse 190px 125px at 10% 8%, rgba(216, 180, 254, 0.42) 0%, rgba(192, 132, 252, 0.26) 40%, rgba(236, 72, 153, 0.12) 65%, transparent 80%),
    /* 2. Bottom-Right Vibrant Saffron Glow sweeping into Footer (#fb923c / #f97316) */
    radial-gradient(ellipse 320px 115px at 78% 102%, rgba(249, 115, 22, 0.65) 0%, rgba(251, 146, 60, 0.42) 45%, rgba(254, 215, 170, 0.18) 75%, transparent 100%),
    /* 3. Pure Crisp White Reflective Base */
    linear-gradient(180deg, #ffffff 0%, #fafafa 65%, #ffffff 100%) !important;
  background-repeat: no-repeat;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 8px 3px 8px;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

/* Authentic Halftone Dotted India Map Watermark in Center-Right (Exact Match to User Reference Photo) */
.card-voter-front::before,
.card-voter-back::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 8px;
  width: 220px;
  height: 210px;
  background-image: url("./images/voter-map-india.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 1;
}

/* Micro-security Horizontal Fine Lines */
.card-voter-front::after,
.card-voter-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 5px, rgba(249, 115, 22, 0.05) 5px, rgba(249, 115, 22, 0.05) 6px, transparent 6px, transparent 11px, rgba(34, 197, 94, 0.05) 11px, rgba(34, 197, 94, 0.05) 12px);
  pointer-events: none;
  z-index: 2;
}

/* Top Header Area: Emblem + Horizontal Rules Title + ECI Logo */
.voter-header-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 0 2px;
}

.voter-emblem-left {
  height: 30px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(18%) sepia(85%) saturate(3000%) hue-rotate(285deg) brightness(85%) contrast(110%);
}

.voter-header-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.voter-header-regional {
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.4px;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 1px;
}

.voter-header-en-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.voter-header-rule {
  flex: 1;
  height: 1px;
  background-color: #000000;
  margin: 0 4px;
}

.voter-header-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.58rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.voter-logo-right {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* Sub-Header: EPIC Number left-aligned directly above photo box */
.voter-sub-header-bar {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 5;
  padding: 0 4px 1px 4px;
  margin-top: 1px;
}

.voter-epic-number {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Ghost Photo & Vertical EPIC Micro-Text Badge */
.voter-ghost-wrapper {
  position: absolute;
  top: 36px;
  right: 8px;
  width: 38px;
  height: 35px;
  z-index: 6;
  pointer-events: none;
}

.voter-ghost-photo-box {
  position: absolute;
  left: 0;
  top: 0;
  width: 25px;
  height: 33px;
  border: 0.5px solid #94a3b8;
  border-radius: 1px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.voter-ghost-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(120%);
  opacity: 0.60;
}

.voter-ghost-epic-vertical {
  position: absolute;
  left: 27px;
  top: 17px;
  width: 33px;
  height: 8px;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.30rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.4px;
  white-space: nowrap;
  line-height: 8px;
  text-align: center;
}

/* Main Body Area: Main Photo (Left) + Details (Right) */
.voter-body-area {
  display: flex;
  align-items: flex-start;
  position: relative;
  z-index: 5;
  gap: 8px;
  flex: 1;
  margin-top: 1px;
}

.voter-photo-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.voter-photo-wrapper::before {
  content: '';
  position: absolute;
  top: -14px;
  left: -14px;
  right: -18px;
  bottom: -14px;
  background-image: url("./images/voter-photo-aura.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.voter-photo-box {
  width: 74px;
  height: 95px;
  border: 1px solid #1e293b;
  border-radius: 1px;
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.voter-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.voter-details-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding-top: 0;
}

.voter-detail-row {
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, Helvetica, sans-serif;
  font-size: 0.58rem;
  line-height: 1.25;
  color: #000000;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px;
}

.voter-row-reg {
  font-weight: normal;
}

.voter-row-en {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.56rem;
}

.voter-detail-lbl {
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, Helvetica, sans-serif;
  font-weight: 900;
  color: #000000 !important;
  letter-spacing: 0.1px;
}

.voter-detail-val {
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, Helvetica, sans-serif;
  font-weight: 500 !important;
  color: #000000 !important;
  word-break: break-word;
}

/* Front Footer */
.voter-front-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, Helvetica, sans-serif;
  font-size: 0.48rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.2px;
  padding-top: 2px;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.voter-footer-dot {
  font-size: 0.38rem;
  color: #000000;
}

/* =========================================================================
   VOTER BACK CARD STYLES
   ========================================================================= */

/* Fine Security Guilloche Curve on Back Upper Left (#d8b4fe / #c084fc) */
.voter-back-guilloche-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 155px;
  height: 70px;
  background-image: 
    repeating-radial-gradient(ellipse at 0% 0%, transparent 0px, transparent 4px, rgba(192, 132, 252, 0.22) 4.5px, transparent 5.5px, transparent 8.5px, rgba(216, 180, 254, 0.18) 9px, transparent 10px),
    radial-gradient(ellipse at 0% 0%, rgba(216, 180, 254, 0.38) 0%, rgba(192, 132, 252, 0.22) 50%, transparent 80%);
  pointer-events: none;
  z-index: 2;
}

.voter-back-body-area {
  display: flex;
  align-items: flex-start;
  position: relative;
  z-index: 5;
  gap: 10px;
  flex: 1;
  padding: 4px 4px 1px 4px;
}

/* Left Column: Signature + QR Code + Scan App + EPIC */
.voter-back-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 126px;
  flex-shrink: 0;
  position: relative;
}

.voter-back-left-col::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -8px;
  right: -8px;
  height: 54px;
  background: radial-gradient(ellipse 110px 54px at 50% 85%, rgba(251, 146, 60, 0.40) 0%, rgba(254, 215, 170, 0.24) 55%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.voter-back-signature-area {
  height: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 8px;
  margin-bottom: 2px;
  opacity: 0.85;
}

.voter-back-qr-box {
  width: 106px;
  height: 106px;
  background: #ffffff !important;
  border-radius: 2px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.voter-back-qr-box canvas,
.voter-back-qr-box img,
.voter-back-qr-box svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}

.voter-back-scan-app {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.45rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  margin-top: 3px;
  letter-spacing: 0.1px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.voter-back-epic-num {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.70rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.8px;
  text-align: center;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}

/* Right Column: Address, ERO & Download Date */
.voter-back-right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  padding-top: 2px;
}

.voter-back-address-section {
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, sans-serif;
  font-size: 0.52rem;
  line-height: 1.25;
  color: #000000;
  word-break: break-word;
}

.voter-back-addr-reg-row {
  line-height: 1.25;
}

.voter-back-addr-en-row {
  line-height: 1.25;
}

.voter-back-label {
  font-weight: 900;
  color: #000000;
  margin-right: 2px;
}

.voter-back-addr-reg-val {
  font-weight: 700;
  color: #000000;
}

.voter-back-addr-text {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  color: #000000;
  text-transform: uppercase;
}

.voter-back-ero-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  margin-top: 3px;
}

.voter-back-ero-reg {
  font-family: 'Mukta', 'Noto Sans Bengali', Arial, sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  color: #000000;
  line-height: 1.2;
}

.voter-back-ero-en {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.50rem;
  font-weight: 800;
  color: #000000;
  line-height: 1.2;
}

.voter-back-download-date {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  color: #000000 !important;
  font-size: 0.54rem;
  letter-spacing: 0.25px;
  margin-top: 2px;
}

.voter-back-download-date span {
  color: #000000 !important;
  font-weight: 800;
}

/* Thin Red Divider Line for Back Side */
.voter-back-divider-red {
  position: relative;
  z-index: 5;
  height: 1px;
  background-color: #d32f2f;
  width: 100%;
  margin: 3px 0 2px 0;
}

/* Official Footer Strip: Helpline 1950 & CEO Portal Website */
.voter-back-footer-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 1px 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.50rem;
  font-weight: 900;
  color: #000000 !important;
}

.voter-footer-left,
.voter-footer-right {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #000000 !important;
  font-weight: 900;
}

.voter-footer-left span,
.voter-footer-right span {
  color: #000000 !important;
  font-weight: 900;
}

/* Decorative Saffron Wave along Back Bottom (#f97316 / #fb923c) */
.voter-back-bottom-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px;
  background-image: url("./images/voter-back-wave.svg");
  background-size: 100% 75px;
  background-repeat: no-repeat;
  background-position: bottom right;
  pointer-events: none;
  z-index: 2;
}

/* =========================================================================
   A4 PRINT SHEET PREVIEW & TOOLBAR (Professional Indian Cyber Cafe & CSC Standard)
   ========================================================================= */

/* Dedicated A4 Sheet Toolbar */
.a4-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  flex-wrap: wrap;
  gap: 10px;
  z-index: 50;
}

.a4-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.a4-toolbar-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.a4-layout-pill-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  gap: 3px;
}

.a4-layout-pill {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.a4-layout-pill:hover {
  color: #1e40af;
}

.a4-layout-pill.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.a4-cut-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  user-select: none;
}

.a4-cut-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #2563eb;
}

.a4-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a4-btn-action {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  transition: all 0.2s ease;
}

.a4-btn-print {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.a4-btn-print:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.a4-btn-pdf {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.a4-btn-pdf:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* A4 Sheet Container (210mm x 297mm) */
.a4-print-sheet-wrapper {
  background: #ffffff;
  width: 210mm;
  height: 297mm;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid #cbd5e1;
  position: relative;
  display: flex;
  box-sizing: border-box;
  transform-origin: top center;
  transition: transform 0.2s ease;
}

/* Vertical Layout (Top Stacked - Paper Saving & Easy Cutting) */
.a4-print-sheet-wrapper.vertical {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 18mm;
  gap: 8mm;
}

/* Side-by-Side Layout (Horizontal at Top - Fold & Laminate) */
.a4-print-sheet-wrapper.side-by-side {
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  padding-top: 22mm;
  gap: 10mm;
}

.a4-card-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Screen Card Sizing in A4 Preview */
.a4-print-sheet-wrapper.vertical .a4-card-slot .official-card-frame {
  width: 380px !important;
  height: 240px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
}

.a4-print-sheet-wrapper.side-by-side .a4-card-slot .official-card-frame {
  width: 360px !important;
  height: 227px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
}

/* Subtle Cutting & Folding Guidelines */
.a4-cut-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
  pointer-events: none;
}

.a4-print-sheet-wrapper.vertical .a4-cut-guide {
  flex-direction: row;
  width: 380px;
  height: 8mm;
}

.a4-print-sheet-wrapper.side-by-side .a4-cut-guide {
  flex-direction: column;
  width: 10mm;
  height: 227px;
}

.cut-guide-line {
  flex: 1;
}

.a4-print-sheet-wrapper.vertical .cut-guide-line {
  border-top: 1.5px dashed #94a3b8;
  height: 0;
}

.a4-print-sheet-wrapper.side-by-side .cut-guide-line {
  border-left: 1.5px dashed #94a3b8;
  width: 0;
  height: 100%;
}

.cut-guide-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 8px;
  white-space: nowrap;
}

.a4-print-sheet-wrapper.side-by-side .cut-guide-badge {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: 8px 2px;
}

/* =========================================================================
   SIGNATURE DRAW PAD MODAL
   ========================================================================= */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 100000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.modal-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  max-width: 820px !important;
  width: 96% !important;
  max-height: 94vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden !important;
  position: relative !important;
}

.modal-header {
  padding: 0.8rem 1.2rem !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.modal-body {
  padding: 1rem 1.2rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 1 auto !important;
}

.sign-pad-canvas {
  width: 100%;
  height: 160px;
  background: #fafafa;
  border: 2px dashed #93c5fd;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}

.modal-footer {
  padding: 0.8rem 1.2rem !important;
  background: #ffffff !important;
  border-top: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  z-index: 10 !important;
}

/* =========================================================================
   TOUCH ERGONOMICS & ACCESSIBILITY (WCAG 2.5.5 MIN 44PX TARGETS)
   ========================================================================= */
body.modal-open {
  overflow: hidden !important;
}

.cropper-responsive-box {
  width: 100% !important;
  height: 460px !important;
  max-height: 56vh !important;
  min-height: 340px !important;
  background: #090d16 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  position: relative !important;
}

.form-control {
  min-height: 44px;
  box-sizing: border-box;
}

textarea.form-control {
  min-height: 60px;
}

.btn-sample-autofill {
  min-height: 44px;
  box-sizing: border-box;
}

.hindi-suggestion-chip {
  min-height: 38px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

input[type="range"].form-range,
#watermarkOpacityRange {
  min-height: 44px;
  cursor: pointer;
}

#cropRotateLeftBtn,
#cropRotateRightBtn,
#cropZoomInBtn,
#cropZoomOutBtn,
#cropResetBtn,
#cropChangeFileLabel,
#cropRatioFreeBtn,
#cropRatioCardBtn,
#cropRatioPhotoBtn,
#executeCropBtn,
#applyCropBtn,
#cancelCropBtn,
.crop-ratio-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* =========================================================================
   MOBILE RESPONSIVENESS & 3-TAB VIEW SWITCHER
   ========================================================================= */
.mobile-view-switcher {
  display: none;
}

.mobile-quick-action-bar {
  display: none;
}

@media (max-width: 768px) {
  /* 1. Body & Page Scroll Unlocking */
  body.official-id-body {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 88px !important; /* Space so sticky bottom quick dock never covers any inputs */
  }

  .id-app-workspace {
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* 2. Compact, Non-Overlapping Mobile Header */
  .glass-navbar {
    position: relative !important;
    top: auto !important;
    height: 50px !important;
    padding: 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
    z-index: 50 !important;
  }

  .glass-navbar .container,
  .glass-navbar .navbar-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important;
    padding: 0 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
  }

  .nav-brand-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .nav-brand-logo {
    height: 28px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .nav-brand-text {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .brand-title-main {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.15 !important;
  }

  .brand-title-sub {
    display: none !important; /* Hide long subtitle on mobile to prevent any text wrapping */
  }

  .nav-actions-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .nav-btn-extra {
    display: none !important; /* Hide bulky secondary links on mobile so they never collide with brand */
  }

  .btn-nav-primary {
    padding: 5px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    background: #1e40af !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    text-decoration: none !important;
  }

  /* 3. Segmented 3-Tab View Switcher (Sticky at Top on Mobile) */
  .mobile-view-switcher {
    display: flex !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  }

  .mobile-tab-btn {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-height: 42px !important;
    padding: 8px 4px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-tab-btn:active {
    transform: scale(0.97);
  }

  .mobile-tab-btn.active {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18) !important;
  }

  .mobile-tab-btn .tab-icon {
    font-size: 0.95rem !important;
  }

  /* 4. Mobile View Management: form | preview | a4 */
  body:not([data-mobile-view]) .id-sidebar,
  body[data-mobile-view="form"] .id-sidebar {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    border-right: none !important;
    overflow: visible !important;
    padding: 0 0 70px 0 !important;
  }

  body:not([data-mobile-view]) .id-preview-stage,
  body[data-mobile-view="form"] .id-preview-stage {
    display: none !important;
  }

  /* Preview View: Live Dual Cards */
  body[data-mobile-view="preview"] .id-sidebar {
    display: none !important;
  }

  body[data-mobile-view="preview"] .id-preview-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    position: static !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    background: #f1f5f9 !important;
    padding: 12px 8px 100px 8px !important;
  }

  body[data-mobile-view="preview"] #dualCardContainer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 16px !important;
    padding: 0 !important;
  }

  body[data-mobile-view="preview"] #a4PrintWrapper {
    display: none !important;
  }

  /* A4 Print Sheet View */
  body[data-mobile-view="a4"] .id-sidebar {
    display: none !important;
  }

  body[data-mobile-view="a4"] .id-preview-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    position: static !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    background: #cbd5e1 !important;
    padding: 12px 6px 100px 6px !important;
  }

  body[data-mobile-view="a4"] #dualCardContainer {
    display: none !important;
  }

  body[data-mobile-view="a4"] #a4PrintWrapper {
    display: flex !important;
  }

  /* 5. Touch Inputs & Form Controls */
  .sidebar-header-box {
    padding: 8px 12px 4px 12px !important;
  }

  .card-selector-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    background: #f1f5f9 !important;
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .card-tab-btn {
    min-height: 36px !important;
    height: 36px !important;
    padding: 5px 4px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
  }

  .id-sidebar input[type="text"],
  .id-sidebar input[type="number"],
  .id-sidebar select {
    font-size: 0.78rem !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
  }

  .id-sidebar textarea {
    font-size: 0.74rem !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
    line-height: 1.25 !important;
  }

  .upload-mini-dropzone {
    min-height: 34px !important;
    padding: 4px 6px !important;
  }

  .upload-photo-btn,
  .btn-upload-qr {
    min-height: 34px !important;
    font-size: 0.76rem !important;
    border-radius: 6px !important;
  }

  .guardian-prefix-container {
    padding: 3px 6px !important;
    margin-bottom: 3px !important;
  }

  .guardian-pill {
    min-height: 25px !important;
    height: 25px !important;
    padding: 2px 2px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
  }

  .hindi-suggestions-box {
    min-height: auto !important;
    padding: 3px 6px !important;
    margin-top: 3px !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    white-space: normal !important;
    gap: 3px 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hindi-suggestion-chip {
    min-height: 22px !important;
    height: auto !important;
    padding: 2px 7px !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .form-section-card {
    padding: 5px 8px !important;
    margin-bottom: 4px !important;
  }

  .form-group {
    margin-bottom: 3px !important;
  }

  .form-grid-2 {
    gap: 4px !important;
    margin-bottom: 3px !important;
  }

  .form-group label {
    font-size: 0.68rem !important;
    margin-bottom: 1px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 6. Card Scaling & Responsive Wrapper */
  .card-preview-wrapper {
    width: calc(380px * var(--card-scale, 0.9)) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .official-card-frame {
    transform: scale(var(--card-scale, 0.9)) !important;
    transform-origin: top center !important;
    margin-bottom: calc(240px * (var(--card-scale, 0.9) - 1)) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12) !important;
  }

  .card-label-badge {
    font-size: 0.72rem !important;
    margin-bottom: 6px !important;
  }

  /* 7. Sticky Mobile Bottom Quick-Action Bar (Ultra-Compact) */
  .mobile-quick-action-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 5px 8px !important;
    padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
    gap: 6px !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25) !important;
  }

  .quick-dock-btn {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    touch-action: manipulation !important;
  }

  .quick-dock-btn:active {
    transform: scale(0.96);
  }

  .quick-dock-btn.btn-dock-toggle {
    background: #3b82f6 !important;
    color: #ffffff !important;
  }

  .quick-dock-btn.btn-dock-pdf {
    background: #10b981 !important;
    color: #ffffff !important;
  }

  .quick-dock-btn.btn-dock-print {
    background: #f59e0b !important;
    color: #ffffff !important;
  }

  /* Mobile Sidebar Bottom Actions - Flow naturally without covering content */
  .sidebar-bottom-actions {
    position: static !important;
    bottom: auto !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 6px 8px !important;
    gap: 4px !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
  }

  .sidebar-form-content {
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  /* Hide desktop-only controls and mobile bottom nav */
  .mobile-bottom-nav,
  .stage-top-controls {
    display: none !important;
  }

  /* Modal visibility & mobile ergonomics: Hide bottom dock and nav when crop modal is open! */
  body.modal-open .mobile-quick-action-bar,
  body.modal-open .mobile-view-switcher,
  body.modal-open .mobile-bottom-nav {
    display: none !important;
  }

  .modal-overlay {
    padding: 6px !important;
    align-items: flex-start !important;
    z-index: 100000 !important;
  }

  .modal-card {
    max-height: 96vh !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .modal-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-footer {
    display: flex !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    position: sticky !important;
    bottom: 0 !important;
    background: #ffffff !important;
    z-index: 50 !important;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08) !important;
  }

  .modal-footer button,
  .modal-footer .btn-nav-action {
    flex: 1 !important;
    min-height: 48px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
  }

  #applyCropBtn {
    flex: 2 !important;
    background: #1e40af !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3) !important;
  }

  .cropper-responsive-box {
    width: 100% !important;
    height: 380px !important;
    max-height: 50vh !important;
    min-height: 280px !important;
    background: #090d16 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    position: relative !important;
  }
}

@media screen and (min-width: 769px) {
  .mobile-view-switcher {
    display: none !important;
  }

  .mobile-quick-action-bar {
    display: none !important;
  }

  .id-sidebar {
    display: flex !important;
  }

  .id-preview-stage {
    display: flex !important;
  }
}

/* Print Stylesheet (Guarantees exact 1-page A4 print output, perfect color preservation and only ID cards) */
@media print {
  @page {
    size: auto;
    margin: 0mm !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    box-sizing: border-box;
  }

  html, body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Completely hide all UI, forms, sidebar, headers, and controls during print */
  header,
  nav,
  aside,
  .site-header,
  .glass-navbar,
  .sidebar,
  .id-sidebar,
  .sidebar-bottom-actions,
  .stage-top-controls,
  .mobile-bottom-nav,
  .mobile-view-switcher,
  .mobile-quick-action-bar,
  .a4-toolbar,
  .modal-overlay,
  .modal,
  .preview-modal,
  .preview-modal-overlay,
  .card-label-badge,
  .a4-center-fold-line,
  .quick-action-btn,
  .view-pill-btn,
  .btn,
  .btn-primary,
  .btn-outline,
  .form-section-card,
  .action-buttons-group,
  .dual-card-container {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    visibility: hidden !important;
  }

  .id-app-workspace,
  .id-preview-stage {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
  }

  .official-card-frame {
    width: 85.6mm !important;
    height: 53.98mm !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .card-aadhaar-front,
  .card-aadhaar-back,
  .card-pan-front,
  .card-pan-back,
  .card-voter-front,
  .card-voter-back {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .a4-print-sheet-wrapper {
    display: flex !important;
    box-shadow: none !important;
    border: none !important;
    transform: none !important;
    margin: 0 auto !important;
    width: 210mm !important;
    height: 297mm !important;
    box-sizing: border-box !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    break-after: avoid !important;
    break-before: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Vertical Mode Print (Top Stacked) */
  .a4-print-sheet-wrapper.vertical {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-top: 18mm !important;
    gap: 8mm !important;
  }

  /* Side-by-Side Mode Print (Horizontal at Top) */
  .a4-print-sheet-wrapper.side-by-side {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 22mm !important;
    gap: 10mm !important;
  }

  .a4-card-slot {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .a4-cut-guide {
    display: flex !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .a4-print-sheet-wrapper.vertical .a4-cut-guide {
    width: 85.6mm !important;
    height: 8mm !important;
  }

  .a4-print-sheet-wrapper.side-by-side .a4-cut-guide {
    width: 10mm !important;
    height: 53.98mm !important;
  }

  .cut-guide-line {
    border-color: #64748b !important;
  }

  .cut-guide-badge {
    background: #ffffff !important;
    color: #475569 !important;
    border-color: #94a3b8 !important;
    font-size: 7.5pt !important;
  }

  .dual-card-container {
    padding: 20mm 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* ============================================================ */
/* ID CARD STUDIO PORTED CONTROLS: FORMAT SELECTOR & ACTION BTNS*/
/* ============================================================ */
.format-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.format-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.format-btn.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
}

.action-buttons-group button {
  width: 100%;
  transition: all 0.2s ease;
}

.action-buttons-group button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.action-buttons-group button:active {
  transform: translateY(0);
}

/* ============================================================ */
/* ULTRA-COMPACT BOTTOM CONTROLS & EXPORT BUTTONS               */
/* ============================================================ */
.bottom-export-format-wrapper {
  margin-bottom: 2px !important;
}

.bottom-export-format-wrapper .format-btn {
  min-height: 25px !important;
  height: 25px !important;
  padding: 2px 4px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  line-height: 1 !important;
}

.sidebar-bottom-actions {
  padding: 5px 8px !important;
  gap: 3px !important;
}

.sidebar-bottom-actions .btn-export-primary {
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 6px !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  border-radius: 5px !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

#singleCardExportSection {
  padding: 5px 8px !important;
  margin-bottom: 4px !important;
}

#singleCardExportSection p {
  display: none !important;
}

#singleCardExportSection button {
  min-height: 26px !important;
  height: 26px !important;
  padding: 3px 4px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
}

#exportActionSection {
  padding: 4px 6px !important;
  margin-bottom: 4px !important;
}

#exportActionSection .action-buttons-group button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 3px !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
}

/* Preview Modal (Full Screen Clean Sheet Preview) */
.preview-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.preview-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 999999999;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: all 0.2s;
}

.preview-modal-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: scale(1.08);
}

.preview-modal-img {
  max-width: 95vw;
  max-height: 94vh;
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  background: #ffffff;
  border-radius: 4px;
}

/* =========================================================================
   DYNAMIC CARD BORDER DECORATIONS (SCISSOR GUIDE & CORNER MARKS)
   ========================================================================= */
.official-card-frame.border-style-scissor::before {
  content: '✂';
  position: absolute;
  top: 1px;
  left: 20px;
  font-size: 13px;
  color: var(--card-border-color, #000000);
  background: #ffffff;
  padding: 0 4px;
  line-height: 1;
  z-index: 25;
  pointer-events: none;
  font-family: Arial, sans-serif;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.official-card-frame.border-style-corner-marks::after {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(to right, var(--card-border-color, #000000) 20px, transparent 20px) top left / 100% 2.5px no-repeat,
    linear-gradient(to bottom, var(--card-border-color, #000000) 20px, transparent 20px) top left / 2.5px 100% no-repeat,
    linear-gradient(to left, var(--card-border-color, #000000) 20px, transparent 20px) top right / 100% 2.5px no-repeat,
    linear-gradient(to bottom, var(--card-border-color, #000000) 20px, transparent 20px) top right / 2.5px 100% no-repeat,
    linear-gradient(to right, var(--card-border-color, #000000) 20px, transparent 20px) bottom left / 100% 2.5px no-repeat,
    linear-gradient(to top, var(--card-border-color, #000000) 20px, transparent 20px) bottom left / 2.5px 100% no-repeat,
    linear-gradient(to left, var(--card-border-color, #000000) 20px, transparent 20px) bottom right / 100% 2.5px no-repeat,
    linear-gradient(to top, var(--card-border-color, #000000) 20px, transparent 20px) bottom right / 2.5px 100% no-repeat;
  pointer-events: none;
  z-index: 25;
}

/* =========================================================================
   PORTED FROM ID CARD STUDIO: FEATURE SUITE PARITY (M1 / ORIGINAL_REQUEST)
   ========================================================================= */

/* 1. Page Setup Controls 2-Column Grid */
.page-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.page-setup-grid .form-group {
  margin: 0;
}

.page-setup-grid label {
  font-size: 0.70rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 2px;
  display: block;
}

.page-setup-grid select.form-control {
  padding: 0.35rem 0.4rem;
  font-size: 0.72rem;
  border-radius: 6px;
  width: 100%;
}

/* 2. Generic Outline Button (.btn-outline) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.42rem 0.5rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-outline:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(0);
}

/* 3. Checkbox Tap Target */
.checkbox-tap-target {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  font-size: 0.71rem;
  font-weight: 700;
}

.checkbox-tap-target input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}

/* 4. Action Buttons 2x2 Grid */
.action-buttons-group {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.45rem !important;
}

.action-buttons-group .btn-primary {
  min-height: 38px !important;
  padding: 0.52rem 0.4rem !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  justify-content: center !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  border: none !important;
  color: #ffffff !important;
  box-sizing: border-box !important;
}

.action-buttons-group .btn-primary:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
}

.action-buttons-group .btn-primary:active {
  transform: translateY(0) !important;
}

/* 5. Format Selector Active States */
.format-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.format-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.format-btn.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
}

/* 6. CR80 Page Size Preset in A4 Print Sheet Wrapper */
.a4-print-sheet-wrapper.page-cr80 {
  width: 85.6mm !important;
  height: 54mm !important;
  min-height: 54mm !important;
  padding: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

.a4-print-sheet-wrapper.page-cr80 .a4-cut-guide {
  display: none !important;
}

.a4-print-sheet-wrapper.page-cr80 #a4SlotBack {
  display: none !important;
}

/* 7. Stamp Perforated & Bleed Guide Card Styles */
.official-card-frame.border-style-stamp {
  outline: 1.5px dashed var(--card-border-color, #000000) !important;
  outline-offset: 2.5px !important;
}

.official-card-frame.has-bleed-guide {
  outline: 1.5px dashed #94a3b8 !important;
  outline-offset: 4px !important;
}


