:root {
  --bg-primary: #070d1e; /* গভীর মহাকাশ নীল থিম */
  --bg-gradient: radial-gradient(circle at 50% 50%, #0d1527 0%, #070d1e 100%);
  --bg-card: rgba(13, 20, 38, 0.65); /* ট্রান্সলুসেন্ট গ্লাস ডার্ক মেটাল */
  --text-main: #f8fafc;
  --text-muted: #5f758f; 
  --primary: #0284c7;
  --accent-teal: #0f766e;
  --danger: #ef4444;
  --border-color: rgba(255, 255, 255, 0.08);
  --font-main: 'Noto Sans Bengali', 'Outfit', sans-serif;
  --neon-glow: 0 0 12px rgba(2, 132, 199, 0.35);
  --login-overlay: 0.65;
}

.light-theme {
  --bg-primary: #f1f5f9;
  --bg-gradient: #f1f5f9; 
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #0284c7;
  --accent-teal: #0d9488;
  --danger: #ef4444;
  --border-color: rgba(0, 0, 0, 0.1);
  --neon-glow: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
}

/* 100% Native App Touch Feedback & Ripple Physics */
button, .btn, .metric-card, .voter-card-replica, .drawer-item, .bottom-tab-item {
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

button:active, .btn:active, .metric-card:active, .voter-card-replica:active, .drawer-item:active, .bottom-tab-item:active {
  transform: scale(0.96) !important;
}

/* Hide Ugly Web Scrollbars (Pure Native App Feel) */
::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}

/* FULLSCREEN OVERLAY VIEW FOR AI CHAT AND TOOLS */
.fullscreen-view-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 3500 !important;
  background: var(--bg-primary) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.fullscreen-view-screen.hidden {
  display: none !important;
}
.fullscreen-view-header {
  height: 44px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fullscreen-view-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fullscreen-iframe {
  width: 100%;
  height: calc(100vh - 44px);
  border: none;
  flex: 1;
}

/* কাস্টম স্প্ল্যাশ স্ক্রিন সিএসএস */
.splash-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: #070d1e;
  background-size: cover;
  background-position: center;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.splash-content img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--neon-glow);
}
.splash-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: var(--neon-glow);
}
.splash-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Animations */
.animate-fade { animation: fadeIn 0.8s ease forwards; }
.animate-zoom { animation: zoomIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.animate-slide { animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body {
  background: var(--bg-gradient) !important;
  color: var(--text-main);
  font-family: var(--font-main);
  transition: background 0.3s, color 0.3s;
  overflow: hidden;
  height: 100vh;
  font-size: 0.76rem;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 10px;
}

/* Toast alert styling */
.toast-popup {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  background: rgba(15, 23, 42, 0.95);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 15px;
  position: relative;
  background-size: cover;
  background-position: center;
}
.login-bg-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(7, 13, 30, var(--login-overlay, 0.65));
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 340px !important;
  position: relative;
  z-index: 2;
  padding: 30px 24px 24px !important;
}

.seal-wrap {
  display: flex; 
  justify-content: center; 
  margin-bottom: 20px;
}
.seal {
  position: relative;
  width: 78px; 
  height: 78px;
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
}
.seal::before {
  content: "";
  position: absolute; 
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--primary), #3fa796, var(--primary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 7s linear infinite;
}
.seal i {
  font-size: 26px;
  color: var(--primary);
  text-shadow: var(--neon-glow);
}

.brand-header {
  margin-bottom: 12px;
  text-align: center;
}
.brand-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.brand-header p {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.login-form-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-card .field {
  margin-bottom: 14px;
  text-align: left;
}
.login-card .field label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.login-card .field-input {
  display: flex; 
  align-items: center; 
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color 0.2s ease;
}
.login-card .field-input:focus-within {
  border-color: var(--primary);
  box-shadow: var(--neon-glow);
}
.login-card .field-input i { 
  color: var(--text-muted); 
  font-size: 13px; 
}
.login-card .field-input input {
  background: transparent; 
  border: none; 
  outline: none;
  color: var(--text-main); 
  font-size: 0.76rem; 
  width: 100%;
  font-family: inherit;
}
.login-card .field-input input::placeholder { 
  color: #5f758f; 
}

.login-card .cta {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: var(--neon-glow);
  transition: filter .2s ease, transform .15s ease;
}
.login-card .cta:hover { filter: brightness(1.08); }
.login-card .cta:active { transform: scale(.98); }

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.74rem;
  text-align: center;
  transition: all 0.25s;
}

.app-main-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.app-top-navbar {
  height: 42px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-toggle-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
}
.nav-brand-title {
  font-weight: 700;
  font-size: 0.85rem;
}
.active-pulse {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

.database-status-indicator {
  background: rgba(2, 132, 199, 0.05);
  padding: 5px 10px;
  font-size: 0.68rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

/* NAVIGATION DRAWER */
.navigation-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 4000;
}
.drawer-menu-sheet {
  width: 280px;
  height: 100%;
  max-height: 100vh; 
  background: linear-gradient(180deg, #070d1e 0%, #030712 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden; 
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
}
.drawer-custom-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
}
.drawer-logo-badge {
  width: 32px;
  height: 32px;
  background: rgba(2, 132, 199, 0.15);
  border-radius: 50%;
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--neon-glow);
}
.drawer-brand-txt h4 {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 700;
}
.drawer-brand-txt p {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.drawer-brand-txt span {
  color: var(--primary);
  font-weight: 700;
}
.drawer-close-circle-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.drawer-close-circle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.drawer-nav-menu-list {
  list-style: none;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px; 
  flex: 1; 
  overflow-y: auto; 
  -webkit-overflow-scrolling: touch;
}

.drawer-item {
  padding: 8px 12px !important;
  border-radius: 10px !important; 
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.25s;
  background: rgba(13, 20, 38, 0.45);
}
.drawer-item:hover {
  background: rgba(13, 20, 38, 0.85);
  border-color: rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}
.item-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.item-text h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.item-text p {
  font-size: 0.62rem;
  color: var(--text-muted);
}
.chevron-icon {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.settings-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(13, 20, 38, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-card.flex-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-icon-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.cc-icon-opt {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: all 0.15s ease;
}
.cc-icon-opt:hover {
  border-color: var(--primary);
  color: var(--text-main);
}
.cc-icon-opt.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(2, 132, 199, 0.1);
}

body.minimal-icons {
  --neon-glow: none !important;
}
body.minimal-icons .item-icon-wrap {
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
}
body.minimal-icons .voter-card-replica {
  box-shadow: none !important;
  border-color: var(--border-color) !important;
}
body.minimal-icons .card-total,
body.minimal-icons .card-male,
body.minimal-icons .card-female {
  box-shadow: none !important;
  border-color: var(--border-color) !important;
}

.cc-icon { background: rgba(56, 189, 248, 0.12); color: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.25); }
.tg-icon { background: rgba(0, 136, 204, 0.12); color: #0088cc; box-shadow: 0 0 8px rgba(0, 136, 204, 0.25); }
.db1-icon { background: rgba(13, 148, 136, 0.12); color: #0d9488; box-shadow: 0 0 8px rgba(13, 148, 136, 0.25); }
.db2-icon { background: rgba(168, 85, 247, 0.12); color: #a855f7; box-shadow: 0 0 8px rgba(168, 85, 247, 0.25); }
.json-icon { background: rgba(249, 115, 22, 0.12); color: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, 0.25); }
.backup-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.25); }
.restore-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.25); }
.theme-icon { background: rgba(236, 72, 153, 0.12); color: #ec4899; box-shadow: 0 0 8px rgba(236, 72, 153, 0.25); }
.info-icon { background: rgba(234, 179, 8, 0.12); color: #eab308; box-shadow: 0 0 8px rgba(234, 179, 8, 0.25); }
.reset-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.25); }
.logout-icon { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.tools-icon { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; box-shadow: 0 0 8px rgba(14, 165, 233, 0.25); }

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  margin-left: auto;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #1e293b;
  transition: .3s;
  border-radius: 20px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 12px; width: 12px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .switch-slider {
  background-color: var(--primary);
  box-shadow: var(--neon-glow);
}
input:checked + .switch-slider:before {
  transform: translateX(16px);
}

.drawer-nav-menu-list .no-chevron .chevron-icon {
  display: none !important;
}

.danger-list-item {
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.05) !important;
}
.danger-list-item:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}
.danger-list-item h4 {
  color: #f87171 !important;
}

.drawer-footer-text {
  margin-top: auto; 
  padding: 10px;
  text-align: center;
  font-size: 0.62rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
}

.app-view-router {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 58px 10px;
}
.view-screen {
  display: none;
}
.view-screen.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.metric-card {
  border-radius: 10px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}
.card-total {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.5));
  border: 1px solid var(--primary);
  box-shadow: var(--neon-glow);
}
.card-male {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(15, 23, 42, 0.5));
  border: 1px solid rgba(13, 148, 120, 0.3);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.08);
}
.card-female {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(15, 23, 42, 0.5));
  border: 1px solid rgba(147, 51, 234, 0.25);
  box-shadow: 0 0 8px rgba(147, 51, 234, 0.08);
}
.metric-info h3 {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.metric-info p {
  font-size: 1.05rem;
  font-weight: 700;
}
.metric-icon {
  font-size: 0.95rem;
  opacity: 0.45;
}
.card-total .metric-icon { color: var(--primary); }
.card-male .metric-icon { color: var(--accent-teal); }
.card-female .metric-icon { color: #d946ef; }

.search-control-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 6px;
}
.search-form-grid input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-main);
  outline: none;
  font-size: 0.74rem; 
  transition: all 0.25s;
}
.search-form-grid input:focus {
  border-color: var(--primary);
  box-shadow: var(--neon-glow);
}

.collapsible-trigger {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
}

/* Android Material Bottom Sheet Slide Up Animation for Advanced Filters */
.collapsible-content {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.advanced-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.advanced-fields-grid select {
  background: #0d1527;
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 6px;
  color: var(--text-main);
  outline: none;
  font-size: 0.74rem;
  transition: all 0.25s;
}
.advanced-fields-grid select:focus {
  border-color: var(--primary);
}
.search-action-row {
  display: flex;
  gap: 6px;
}
.btn-secondary-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px;
  font-size: 0.74rem;
}
.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.08);
}
.btn-primary-action {
  flex: 2;
  background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
  color: white;
  padding: 6px;
  font-size: 0.74rem;
  box-shadow: var(--neon-glow);
}
.btn-primary-action:hover {
  opacity: 0.95;
}

.results-metadata-bar {
  padding: 6px 4px 2px 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.results-gender-pct {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
}

.results-display-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
  gap: 10px;
  margin-top: 6px;
}

/* COMPACT VOTER CARD REPLICA STYLING */
.voter-card-replica {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--primary) !important;
  background-color: var(--bg-card);
  box-shadow: var(--neon-glow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.voter-card-replica:hover {
  transform: translateY(-2px);
}

.voter-replica-header {
  background-color: var(--primary) !important;
  color: #ffffff;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.voter-replica-title {
  font-weight: 700;
  font-size: 0.76rem; 
}
.voter-replica-id-badge {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
}

.voter-replica-body {
  padding: 8px; 
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.replica-details-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.replica-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem; 
}
.replica-row i {
  color: var(--text-muted);
  width: 14px;
  font-size: 0.7rem; 
}
.replica-label {
  color: var(--text-muted);
  font-weight: 500;
}
.replica-val {
  font-weight: 700;
}

.replica-colored-items-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.replica-colored-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 4px 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.replica-colored-box i {
  font-size: 0.65rem; 
  opacity: 0.6;
}
.replica-grey-lbl {
  font-size: 0.58rem;
  color: var(--text-muted);
}
.replica-green-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981; 
}
.replica-orange-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f97316; 
}
.replica-blue-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: #3b82f6; 
}

.replica-address-box {
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 5px;
  padding: 6px;
  font-size: 0.68rem; 
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.replica-address-box i {
  color: var(--text-muted);
  margin-top: 1px;
  font-size: 0.65rem;
}

.replica-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px dashed var(--border-color);
  padding-top: 6px;
}
.replica-area-code {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}
.replica-plaintext-copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: var(--font-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  transition: all 0.2s;
}
.replica-plaintext-copy-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--neon-glow);
}
.replica-gender-badge {
  background-color: rgba(255, 255, 255, 0.04);
  padding: 2px 5px;
  border-radius: 10px;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  gap: 3px;
}
.replica-gender-badge i {
  font-size: 0.65rem;
}
.replica-bookmark-btn {
  background: none;
  border: none;
  font-size: 0.8rem; 
  cursor: pointer;
  padding: 2px;
  margin-left: 5px;
}
.replica-bookmark-btn.saved {
  color: #f59e0b;
}
.replica-bookmark-btn.not-saved {
  color: var(--text-muted);
}
.replica-edit-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px;
  transition: color 0.2s;
}
.replica-edit-btn:hover {
  color: var(--primary);
}

.savelist-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.savelist-header-row h2 {
  font-size: 1rem;
}
.back-text-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.76rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 12px;
}
.empty-icon {
  font-size: 1.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  opacity: 0.35;
}

.modal-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.modal-card-box {
  background: #070d1e;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: zoomIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.modal-card-header {
  background: var(--bg-card);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.modal-card-header h3 {
  font-size: 0.8rem;
}
.modal-close-trigger {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-card-body {
  padding: 10px;
}

.cc-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cc-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.74rem;
  outline: none;
  transition: all 0.25s;
}
.cc-input:focus {
  border-color: var(--primary);
}
.cc-row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

/* ৪ নম্বর ড্যাশবোর্ড স্ক্রিন সিএসএস */
.dashboard-header-bar {
  margin-bottom: 12px;
}
.dashboard-header-bar h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-header-bar p {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.chart-card-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.chart-canvas-wrapper {
  position: relative;
  height: 200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 44px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bottom-tab-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.62rem;
  cursor: pointer;
  transition: all 0.2s;
}
.bottom-tab-item i {
  font-size: 0.9rem; 
}
.bottom-tab-item.active {
  color: var(--primary);
  text-shadow: var(--neon-glow);
}

.hidden { display: none !important; }

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
    font-family: 'Noto Sans Bengali', sans-serif !important;
  }
  
  .app-top-navbar, 
  .app-bottom-navbar, 
  .database-status-indicator, 
  .search-control-box, 
  .savelist-header-row button, 
  .navigation-drawer-overlay, 
  .modal-dialog-overlay, 
  .metrics-grid, 
  #toast {
    display: none !important;
  }
  
  .app-view-router {
    padding: 0 !important;
    overflow: visible !important;
  }
  
  #savelist-view {
    display: block !important;
    overflow: visible !important;
  }
  
  #home-view, #generic-view, #dashboard-view {
    display: none !important;
  }
  
  .voter-card-replica {
    border: 1px solid #000000 !important;
    page-break-inside: avoid;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
    border-radius: 6px !important;
  }
  
  .voter-replica-header {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
    border-bottom: 1px solid #000000 !important;
  }
  
  .voter-replica-id-badge {
    background: none !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  
  .replica-colored-box {
    border: 1px solid #000000 !important;
    background: #ffffff !important;
  }
  
  .replica-green-val, 
  .replica-orange-val, 
  .replica-blue-val {
    color: #000000 !important;
  }
  
  .replica-address-box {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  
  .replica-gender-badge {
    background: none !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  
  .replica-bookmark-btn {
    display: none !important;
  }
}