/* Production Accessible Design System (WCAG 2.1 AA Compliant) */
/* System Fonts Only - Zero External Fonts/Tracking */

:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --primary-light: #dbeafe;
  --accent: #2563eb;
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --purple: #7e22ce;
  --purple-bg: #f3e8ff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 10px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --focus-ring: 0 0 0 3px rgba(30, 58, 138, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: #f8fafc;
  color: var(--gray-900);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Focus States */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Header & Navigation (90% Width Flow) */
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Main Container (Strict 90% Screen Width) */
main {
  flex: 1;
  width: 90%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 1.75rem 0;
}

/* Status Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.stat-card.card-pending::before { background: var(--warning); }
.stat-card.card-verify::before { background: var(--accent); }
.stat-card.card-ready::before { background: var(--success); }

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
}

/* User Guide & Animated Workflow Banner */
.guide-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.guide-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.guide-badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Workflow Steps Interactive Grid */
.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.step-icon-wrapper {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  animation: floatAnim 3s ease-in-out infinite;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
}

.step-desc {
  font-size: 0.8125rem;
  color: var(--gray-600);
  line-height: 1.5;
  flex: 1;
}

.step-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.75rem;
  background: var(--gray-100);
  color: var(--gray-700);
}

/* Filter & Search Bar */
.filter-bar {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.5rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-700);
  min-height: 44px;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: var(--gray-200);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.25);
}

.search-input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  min-width: 320px;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

/* Data Table */
.table-wrapper {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  min-width: 800px;
}

th {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
}

tr:hover {
  background: #f8fafc;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-verify { background: var(--primary-light); color: var(--primary); }
.badge-submitted { background: #e0e7ff; color: #4338ca; }
.badge-ready { background: var(--success-bg); color: var(--success); }
.badge-collected { background: var(--gray-200); color: var(--gray-700); }
.badge-purged { background: #f1f5f9; color: #64748b; text-decoration: line-through; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.55rem 1.15rem;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.875rem;
  min-height: 44px;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #ffffff; }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-secondary { background: var(--gray-100); color: var(--gray-800); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); }

/* Modal & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  padding: 1.75rem;
  animation: modalScale 0.2s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

/* Offline & Alert Banners */
.banner {
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  display: none;
}

.banner-offline { background: var(--warning); color: #ffffff; }
.banner-error { background: var(--danger); color: #ffffff; }

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--gray-600);
}

.empty-state h3 {
  color: var(--gray-900);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Footer (Matching 90% Width) */
footer {
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
  padding: 2rem 5%;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Keyframe Animations */
@keyframes floatAnim {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.pulse-button {
  animation: pulseGlow 2s infinite;
}

/* ==========================================================================
   INTERACTIVE ONBOARDING TOUR & MASTER LOCATION GUIDE
   ========================================================================== */
.tour-modal-content {
  max-width: 860px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.tour-mode-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.25rem 0.25rem 0.75rem 0.25rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

#tour-content-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
}

.tour-mode-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-700);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tour-mode-btn:hover {
  background: var(--gray-200);
}

.tour-mode-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.25);
}

.tour-progress-wrapper {
  margin-bottom: 1rem;
}

.tour-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.tour-progress-track {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 9999px;
  overflow: hidden;
}

.tour-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-step-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.tour-badge-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.tour-q-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  border-top: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.tour-q-box strong {
  display: block;
  color: #1e3a8a;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.tour-q-box p {
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

.tour-tip-box {
  background: #f0fdf4;
  border-left: 4px solid var(--success);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.8125rem;
  color: #14532d;
  border-top: 1px solid #bbf7d0;
  border-right: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
}

.tour-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.25rem;
}

.tour-map-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.tour-map-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Spotlight Element Glow */
.tour-highlight {
  outline: 4px solid #2563eb !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.7) !important;
  animation: tourGlow 1.5s infinite alternate !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  z-index: 35 !important;
}

@keyframes tourGlow {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  100% { box-shadow: 0 0 25px 8px rgba(37, 99, 235, 0.35); }
}

/* ==========================================================================
   OFFICIAL DPDP ACT 2023 CERTIFIED SEAL & CERTIFICATE STYLING
   ========================================================================== */
.badge-dpdp-seal {
  background: #047857 !important;
  color: #ffffff !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  border: 1px solid #10b981 !important;
  box-shadow: 0 1px 3px rgba(4, 120, 87, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-dpdp-seal:hover {
  background: #065f46 !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(4, 120, 87, 0.4);
}

.dpdp-seal-banner {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
  border: 1px solid #34d399;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dpdp-seal-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 78, 59, 0.35);
}

.seal-badge-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.seal-gold-emblem {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.seal-heading {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: #fef08a;
  margin-bottom: 0.15rem;
}

.seal-subheading {
  font-size: 0.78rem;
  color: #d1fae5;
  font-weight: 500;
}

.seal-verify-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease;
  color: #ffffff;
}

.seal-verify-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dpdp-cert-modal {
  max-width: 800px;
  width: 95%;
  border-top: 5px solid #047857;
}

.dpdp-cert-card {
  background: #ffffff;
  border: 4px double #d97706;
  border-radius: 8px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 30%);
}

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(4, 120, 87, 0.04);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

.cert-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.cert-pillar-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid #047857;
}

.cert-pillar-item strong {
  display: block;
  font-size: 0.8rem;
  color: #065f46;
  margin-bottom: 0.25rem;
}

.cert-pillar-item p {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.cert-gold-stamp {
  border: 3px double #d97706;
  border-radius: 50%;
  width: 92px;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #b45309;
  background: #fffbeb;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  transform: rotate(-5deg);
}

.dpdp-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  color: #166534;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dpdp-footer-badge:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

@media print {
  body * {
    visibility: hidden;
  }
  #dpdp-seal-modal, #dpdp-seal-modal * {
    visibility: visible;
  }
  #dpdp-seal-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 0;
  }
  .modal-header button, .dpdp-cert-modal .btn {
    display: none !important;
  }
}

/* Mobile Menu Toggle Button (Desktop Hidden) */
.mobile-menu-toggle {
  display: none;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary);
  min-height: 38px;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE RULES (Mobile-First Hardening & Zero Overflow)
   ========================================================================== */
@media (max-width: 1024px) {
  main {
    width: 94%;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }

  /* Compact Sleek Sticky Header */
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 4%;
    position: sticky;
    top: 0;
    z-index: 60;
  }

  .brand-container {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 95px);
    overflow: hidden;
  }

  .brand-container > div {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .brand-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  #kiosk-header-sub {
    font-size: 0.68rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: 0.5rem;
  }

  /* PWA Install Banner Mobile */
  #pwa-install-banner {
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
    text-align: center !important;
    padding: 0.6rem 0.75rem !important;
  }
  #pwa-install-banner > div:first-child {
    justify-content: center !important;
    font-size: 0.78rem !important;
  }
  #pwa-install-banner > div:last-child {
    justify-content: center !important;
    gap: 0.75rem !important;
  }

  /* DPDP Banner Mobile Overflow Fix */
  .dpdp-seal-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.75rem 1rem !important;
    gap: 0.65rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .seal-badge-left {
    gap: 0.6rem !important;
  }

  .seal-heading {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }

  .seal-subheading {
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
  }

  .seal-badge-right {
    width: 100% !important;
  }

  .seal-verify-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
    font-size: 0.75rem !important;
    padding: 0.45rem 0.5rem !important;
    white-space: normal !important;
  }

  /* Login Card Mobile Padding */
  #login-section {
    margin: 1.5rem auto !important;
    padding: 1.5rem 1rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Dropdown Mobile Nav Links Drawer */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--gray-300);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 100;
  }

  .nav-links.mobile-open {
    display: flex !important;
  }

  .nav-links .btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.875rem;
    justify-content: center;
  }

  main {
    width: 95%;
    padding: 1rem 0;
  }

  /* Prevent iOS Auto-Zoom Bug */
  input, select, textarea {
    font-size: 16px !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.85rem;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  /* Scroll Hint for Mobile Table */
  .table-wrapper {
    position: relative;
  }

  .table-wrapper::after {
    content: '↔️ Table ko aage-peeche scroll karein sabhi columns ke liye';
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.4rem 0.75rem;
    text-align: right;
    border-top: 1px solid var(--gray-200);
  }

  /* Touch-Friendly Modals */
  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-content {
    padding: 1.25rem 1rem;
    max-height: 92vh;
    border-radius: var(--radius);
    width: 96%;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }

  .filter-tabs {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .filter-btn {
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
  }

  .search-box-wrapper {
    width: 100%;
    box-sizing: border-box;
  }

  .search-input {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .workflow-steps-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.25rem;
    margin: 0.5rem;
    max-height: 94vh;
  }

  .tour-map-grid {
    grid-template-columns: 1fr;
  }

  .tour-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  #tour-step-actions {
    width: 100%;
    justify-content: space-between;
  }

  #tour-step-actions .btn {
    flex: 1;
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .brand-title {
    font-size: 1.1rem;
  }
}
