:root {
  --bg-main: #F8FAFC;
  --surface-1: #FFFFFF;
  --surface-2: #F1F5F9;
  --surface-card: #FFFFFF;
  --border-light: #E2E8F0;
  --border-subtle: #EDF2F7;
  
  --gold-primary: #D97706;
  --gold-hover: #B45309;
  --gold-glow: rgba(217, 119, 6, 0.22);
  --gold-tint: rgba(217, 119, 6, 0.08);

  --emerald: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.22);
  --emerald-tint: rgba(16, 185, 129, 0.08);

  --crimson: #EF4444;
  --crimson-glow: rgba(239, 68, 68, 0.22);

  --text-heading: #0F172A;
  --text-body: #475569;
  --text-muted: #64748B;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-heading);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Vector SVG Icon Suite */
.v-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.v-icon-xs { width: 12px; height: 12px; stroke-width: 2.2; }
.v-icon-sm { width: 15px; height: 15px; }
.v-icon-md { width: 18px; height: 18px; }
.v-icon-lg { width: 22px; height: 22px; }
.v-icon-xl { width: 32px; height: 32px; }
.v-icon-2xl { width: 42px; height: 42px; }

/* =================================================================== */
/* 1. VIEW ROUTING & GENERAL WRAPPERS                                  */
/* =================================================================== */
.app-view {
  display: none;
  width: 100%;
  min-height: 100vh;
}

.app-view.active {
  display: flex;
  flex-direction: column;
}

/* =================================================================== */
/* 2. UNIFIED SINGLE LOGIN VIEW                                        */
/* =================================================================== */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(circle at top center, rgba(217, 119, 6, 0.08) 0%, #F8FAFC 70%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo-container-lg {
  height: 64px;
  max-width: 240px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img-lg {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo-img-sm {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.brand-logo-img-admin {
  height: 52px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.brand-tagline {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.login-card {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 13px 14px 13px 44px;
  color: var(--text-heading);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.input-with-icon input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.btn-face-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.btn-face-login:hover {
  background: rgba(16, 185, 129, 0.15);
}

.face-badge {
  font-size: 10px;
  background: rgba(16, 185, 129, 0.18);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.btn-primary-glow {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border: none;
  color: #FFFFFF;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--gold-glow);
  transition: all 0.2s ease;
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-1px);
}

.login-footnote {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.4;
}

.login-feedback {
  margin-top: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: center;
  font-weight: 600;
}

.login-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--crimson);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.login-feedback.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.login-default-hint {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.login-default-hint strong {
  color: var(--gold-primary);
}


/* =================================================================== */
/* 3. USER MOBILE APP SUITE (LIGHT THEME)                              */
/* =================================================================== */
.mobile-app-shell {
  flex: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100vh;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.08);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.mobile-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 50;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-subtitle {
  font-size: 11px;
  color: var(--gold-primary);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mobile-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-greeting-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-heading);
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.btn-icon-logout {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-body);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.mobile-content-viewport {
  flex: 1;
  padding: 20px 18px 84px; /* clearance for bottom nav */
  overflow-y: auto;
  background: #F8FAFC;
}

.user-subscreen {
  display: none;
}

.user-subscreen.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* User SubScreen A: Home / Authentication */
.auth-header-card {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto;
}

/* Central Hero "Scan to Clock In/Out" Button */
.scan-hero-container {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 20px auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(217, 119, 6, 0.22);
  animation: pulseConcentric 3.5s infinite linear;
}

.ring-1 { width: 230px; height: 230px; animation-delay: 0s; }
.ring-2 { width: 210px; height: 210px; animation-delay: 1.2s; }
.ring-3 { width: 190px; height: 190px; animation-delay: 2.4s; }

@keyframes pulseConcentric {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 0.3; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-scan-clock {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, #F59E0B 0%, #D97706 70%, #B45309 100%);
  border: 4px solid #FDE68A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 28px rgba(217, 119, 6, 0.35);
  cursor: pointer;
  position: relative;
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-scan-clock:hover {
  transform: scale(1.04);
}

.btn-scan-clock:active {
  transform: scale(0.96);
}

.scan-icon-wrapper {
  width: 44px;
  height: 44px;
}

.scan-reticle-svg {
  width: 100%;
  height: 100%;
}

.scan-btn-label {
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  text-align: center;
  max-width: 120px;
  line-height: 1.2;
}

/* Today's Punch Card */
.punch-today-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.today-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.today-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-heading);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  line-height: 1.2;
  background: rgba(239, 68, 68, 0.1);
  color: var(--crimson);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.pill-badge.clocked-in {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.pill-badge.active-shift,
.pill-badge.clocked-out {
  background: rgba(217, 119, 6, 0.12);
  color: var(--gold-primary);
  border-color: rgba(217, 119, 6, 0.3);
}

.today-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.today-stat-col {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
}

.today-location-row,
#successLocationRow {
  display: none !important;
}

.btn-secondary-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--gold-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

/* User SubScreen B: Analysing Face (Camera View) */
.scan-view-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scan-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.btn-back-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.scan-top-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
}

.camera-reticle-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000000;
  border: 2px solid var(--border-light);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

#userCameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.reticle-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #F59E0B;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.reticle-corner.tl { top: 18px; left: 18px; border-top: 3.5px solid; border-left: 3.5px solid; }
.reticle-corner.tr { top: 18px; right: 18px; border-top: 3.5px solid; border-right: 3.5px solid; }
.reticle-corner.bl { bottom: 18px; left: 18px; border-bottom: 3.5px solid; border-left: 3.5px solid; }
.reticle-corner.br { bottom: 18px; right: 18px; border-bottom: 3.5px solid; border-right: 3.5px solid; }

.laser-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald), transparent);
  box-shadow: 0 0 10px var(--emerald);
  animation: laserScan 2.4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes laserScan {
  0% { top: 10%; opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

.scan-success-anim {
  position: absolute;
  inset: 0;
  background: rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.scan-success-anim.visible {
  opacity: 1;
}

.anim-check-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--emerald);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 0 24px var(--emerald);
}

.scan-telemetry-panel {
  width: 100%;
  margin-top: 18px;
}

.scan-status-headline {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-primary);
  text-align: center;
  margin-bottom: 14px;
}

.telemetry-checklist {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-body);
}

.checklist-item.verified {
  color: var(--emerald);
  font-weight: 700;
}

.checklist-item.verified .check-icon {
  color: var(--emerald);
}

.btn-manual-trigger {
  width: 100%;
  background: rgba(217, 119, 6, 0.08);
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  color: var(--gold-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* User SubScreen C: Clock In Successful */
.success-screen-card {
  text-align: center;
  padding-top: 10px;
}

.success-check-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 4px 12px var(--emerald-glow));
}

.checkmark-svg {
  width: 100%;
  height: 100%;
}

.success-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.success-subtitle {
  font-size: 13px;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 24px;
}

.success-snapshot-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.success-snapshot-card img {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--emerald);
}

.snapshot-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.detail-label {
  color: var(--text-muted);
}

.detail-val {
  font-weight: 700;
  color: var(--text-heading);
}

.detail-val.gold { color: var(--gold-primary); }
.detail-val.emerald { color: var(--emerald); }

.btn-ghost {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-body);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
}

/* User SubScreen D: History */
.history-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-heading);
}

.month-pill {
  font-size: 12px;
  color: var(--gold-primary);
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
}

.history-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-day-tile {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease;
}

.history-day-tile:hover {
  box-shadow: none;
  border-color: #CBD5E1;
}

.day-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.day-tile-date-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.day-tile-date {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
}

.day-tile-day {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.day-tile-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.day-tile-avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.day-tile-selfie {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-primary);
  box-shadow: none;
}

.selfie-verified-tag {
  font-size: 9px;
  font-weight: 800;
  color: #059669;
  background: #D1FAE5;
  padding: 2px 6px;
  border-radius: 4px;
}

.day-tile-punches {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 2px;
}

.punch-stream-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.punch-stream-bullet {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}
.punch-stream-bullet.in {
  background: #10B981;
  box-shadow: none;
}
.punch-stream-bullet.out {
  background: #F59E0B;
  box-shadow: none;
}

.punch-stream-content {
  flex: 1;
}

.punch-stream-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.punch-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
}
.punch-tag.in {
  background: #D1FAE5;
  color: #065F46;
}
.punch-tag.out {
  background: #FEF3C7;
  color: #92400E;
}

.punch-time-bold {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
}

.punch-stream-loc {
  font-size: 11px;
  color: var(--text-body);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  word-break: break-word;
}

.punch-stream-line {
  width: 2px;
  height: 12px;
  background: #E2E8F0;
  margin-left: 3.5px;
  border-radius: 2px;
}

.day-tile-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  background: #F8FAFC;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  box-sizing: border-box;
}

.footer-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-metric.full-width {
  grid-column: 1 / -1;
  padding-top: 6px;
  border-top: 1px dashed #E2E8F0;
  margin-top: 2px;
}

.footer-metric .metric-label {
  font-weight: 700;
  color: #64748B;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-metric .metric-val {
  font-weight: 800;
  font-size: 13px;
  color: #0F172A;
}

.footer-metric .metric-val.gold {
  color: #EA580C;
}

.footer-metric .metric-val.emerald {
  color: #059669;
}

.drive-photo-link {
  color: #059669;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s ease;
}

.drive-photo-link:hover {
  opacity: 0.8;
}

.day-breakdown-details {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-tile-expander {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-primary);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.admin-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
  padding: 12px 0;
}

.admin-tile-emp-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-primary);
  background: var(--gold-tint);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(217, 119, 6, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* User SubScreen E: Profile & Stepper */
.profile-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.profile-avatar-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-primary);
  margin: 0 auto 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 2px;
  color: var(--text-heading);
}

.profile-dept {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.profile-id-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--gold-primary);
  font-family: monospace;
  background: rgba(217, 119, 6, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.face-registration-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.card-subtitle {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-heading);
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  position: relative;
  color: var(--text-muted);
}

.step-circle.active {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: rgba(217, 119, 6, 0.1);
}

.step-label {
  position: absolute;
  bottom: -18px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-light);
  margin: 0 8px;
}

.btn-secondary-glow {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid var(--gold-primary);
  color: var(--gold-primary);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.offline-sync-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sync-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-icon {
  font-size: 20px;
}

.sync-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-heading);
}

.sync-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-ctrl-sm {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-danger-outline {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--crimson);
  color: var(--crimson);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

.mobile-nav-item {
  flex: 1;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.mobile-nav-item.active {
  color: var(--gold-primary);
}

.mobile-nav-icon {
  font-size: 18px;
}

.mobile-nav-label {
  font-size: 11px;
  font-weight: 700;
}


/* =================================================================== */
/* 4. ADMIN WEB DASHBOARD SUITE (LIGHT THEME)                          */
/* =================================================================== */
.admin-layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-main);
}

.admin-sidebar {
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-sidebar-brand {
  padding: 24px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.sidebar-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 1.5px;
  background: rgba(217, 119, 6, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.admin-nav-menu {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.admin-nav-item:hover {
  background: var(--surface-2);
  color: var(--text-heading);
}

.admin-nav-item.active {
  background: rgba(217, 119, 6, 0.1);
  color: var(--gold-primary);
  font-weight: 800;
}

.nav-icon {
  font-size: 16px;
}

.admin-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-preview-user {
  width: 100%;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.25);
  color: var(--gold-primary);
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-logout-sidebar {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  min-width: 0;
  overflow-y: auto;
}

.admin-header {
  padding: 16px 28px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-header-search {
  position: relative;
  width: 320px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
}

.admin-header-search input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 36px;
  color: var(--text-heading);
  font-size: 13px;
  outline: none;
}

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

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-heading);
  font-weight: 700;
}

.firestore-cloud-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  font-size: 11px;
  font-weight: 700;
  color: #065F46;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 6px #10B981;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.admin-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EA580C;
  box-shadow: 0 0 6px rgba(234, 88, 12, 0.5);
}

.btn-ctrl-gold {
  background: linear-gradient(135deg, #FF6B00 0%, #EA580C 100%);
  border: none;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.32);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-ctrl-gold:hover {
  background: linear-gradient(135deg, #FF7D1A 0%, #C2410C 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4);
}

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

.admin-subscreen {
  display: none;
  padding: 24px;
}

.admin-subscreen.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Premium KPI Quad Grid */
.kpi-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-gold-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.kpi-gold-card:hover {
  transform: translateY(-2px);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-count {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #0F172A;
}

.kpi-icon-pill {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #EEF2FF;
  color: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.kpi-gold-card:hover .kpi-icon-pill {
  transform: scale(1.06);
}

.kpi-icon-pill.emerald {
  background: #ECFDF5;
  color: #059669;
}

.kpi-icon-pill.amber {
  background: #FFF7ED;
  color: #EA580C;
}

.kpi-icon-pill.crimson {
  background: #FFF1F2;
  color: #E11D48;
}

.kpi-card-in .kpi-count {
  color: #059669;
}

.kpi-card-out .kpi-count {
  color: #D97706;
}

.kpi-card-late .kpi-count {
  color: #E11D48;
}

.kpi-title {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.kpi-meta {
  font-size: 11.5px;
  font-weight: 500;
  color: #94A3B8;
}

/* Dashboard Analytics Row */
.dashboard-analytics-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.analytics-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0F172A;
}

.panel-tag {
  font-size: 11px;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

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

#attendanceTrendCanvas {
  width: 100%;
  height: 100%;
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 12px 14px;
  border-radius: 14px;
  color: #0F172A;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-item:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.action-icon {
  font-size: 18px;
}

.action-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.action-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

/* Admin Tables */
.admin-table-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: none;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toolbar-input {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-heading);
  outline: none;
}

.btn-ctrl-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Segmented Filter Pills */
.chart-filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 3px;
}

.filter-pill {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.filter-pill:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.7);
}

.filter-pill.active {
  background: #FFFFFF;
  color: #D97706;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.vcatch-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.vcatch-admin-table th {
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.vcatch-admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-heading);
  vertical-align: middle;
}

.table-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-primary);
  display: block;
  margin: 0 auto;
}

.table-action-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.table-action-btn.edit:hover {
  color: var(--gold-primary);
  background: rgba(217, 119, 6, 0.1);
}

.table-action-btn.delete:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Single Unified Punch Cell (In & Out Details) - Strict Grid Alignment */
.table-unified-punch-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 290px;
}

.table-punch-entry {
  display: grid;
  grid-template-columns: 38px 90px 1fr;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.punch-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 0;
  border-radius: 4px;
  line-height: 1;
  text-align: center;
}

.punch-mini-badge.in {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.punch-mini-badge.out {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.table-punch-time {
  font-weight: 800;
  font-size: 13px;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-punch-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.table-multiple-punches {
  margin-top: 4px;
  font-size: 11px;
}

.table-multiple-punches summary {
  cursor: pointer;
  color: var(--gold-primary);
  font-weight: 600;
  outline: none !important;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table-multiple-punches summary::-webkit-details-marker,
.table-multiple-punches summary::marker {
  display: none;
}

.table-multiple-punches summary:focus,
.table-multiple-punches summary:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.table-multiple-punches summary:hover {
  text-decoration: underline;
}

.table-punch-breakdown {
  margin-top: 5px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-body);
}

/* Map Container */
.map-container-box {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #F8FAFC;
}

#adminGpsMap {
  width: 100%;
  height: 100%;
  display: block;
  z-index: 10;
}

.real-gps-pin {
  background: transparent !important;
  border: none !important;
}

.leaflet-popup-content-wrapper {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.leaflet-popup-tip {
  background: #FFFFFF !important;
}

.leaflet-container {
  font-family: var(--font-sans) !important;
  background: #F8FAFC !important;
}

/* Face Database Grid */
.face-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 10px 0;
}

.face-db-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 0.2s ease;
}

.face-db-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-primary);
}

.face-db-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-primary);
  margin: 0 auto 10px;
}

.face-db-name {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text-heading);
}

.face-db-id {
  font-size: 11px;
  color: var(--gold-primary);
  font-family: monospace;
  margin-bottom: 8px;
}

.face-db-badge {
  font-size: 10px;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 700;
}

/* System Settings */
.settings-panel {
  max-width: 760px;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.setting-name {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text-heading);
}

.setting-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-status-green {
  font-size: 11px;
  color: var(--emerald);
  font-weight: 700;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: var(--gold-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.danger-zone-box {
  margin-top: 32px;
  padding: 18px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.04);
}

.danger-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--crimson);
  margin-bottom: 4px;
}

.danger-desc {
  font-size: 12px;
  color: var(--text-body);
  margin-bottom: 14px;
}

.danger-actions {
  display: flex;
  gap: 12px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-heading);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

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

.modal-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-heading);
  font-size: 13px;
  outline: none;
}

.enroll-camera-viewport {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold-primary);
  margin: 0 auto 14px;
  background: #000;
}

#modalCameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .admin-layout-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
  }
  .admin-nav-menu {
    flex-direction: row;
    overflow-x: auto;
  }
  .kpi-quad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-analytics-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kpi-quad-grid {
    grid-template-columns: 1fr;
  }
  .enroll-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   9. SECURITY ALERTS & PROXY BREACH DETECTION STYLES
   =================================================================== */

.alert-count-pill {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.security-alerts-banner {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-left: 4px solid #EF4444;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
  animation: slideDown 0.3s ease;
}

.security-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.security-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-red-dot {
  width: 10px;
  height: 10px;
  background-color: #EF4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseRed 1.6s infinite;
}

@keyframes pulseRed {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-sm-danger-ghost {
  background: transparent;
  border: 1px solid #F87171;
  color: #DC2626;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sm-danger-ghost:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.security-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.security-alert-card {
  background: #FFFFFF;
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.security-alert-card.resolved {
  border-color: var(--border-light);
  opacity: 0.75;
}

.security-alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #FEE2E2;
  padding-bottom: 10px;
}

.security-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FEE2E2;
  color: #991B1B;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.security-alert-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.security-alert-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 768px) {
  .security-alert-body {
    grid-template-columns: 1fr;
  }
}

.security-side-by-side {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.sec-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sec-photo-col img {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.sec-photo-col.impostor img {
  border-color: #EF4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.sec-photo-col.registered img {
  border-color: #10B981;
}

.sec-label-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.sec-label-pill.red {
  background: #FEE2E2;
  color: #DC2626;
}
.sec-label-pill.green {
  background: #D1FAE5;
  color: #059669;
}

.sec-vs {
  font-weight: 900;
  font-size: 12px;
  color: var(--text-muted);
}

.security-alert-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sec-detail-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
}

.sec-detail-desc {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.5;
}

.sec-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sec-meta-item strong {
  color: var(--text-heading);
}

.security-alert-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

/* User SubScreen F: Mismatch Rejection */
.mismatch-screen-card {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  padding: 30px 20px;
  animation: fadeIn 0.3s ease;
}

.mismatch-alert-badge {
  width: 72px;
  height: 72px;
  background: #FEE2E2;
  border: 3px solid #EF4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.25);
  animation: pulseRed 2s infinite;
}

.mismatch-alert-icon {
  font-size: 36px;
}

.mismatch-title {
  font-size: 20px;
  font-weight: 800;
  color: #DC2626;
  margin-bottom: 4px;
}

.mismatch-subtitle {
  font-size: 13px;
  color: var(--text-body);
  margin-bottom: 20px;
}

.mismatch-comparison-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.08);
}

.mismatch-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mismatch-photo-box img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #E2E8F0;
}

.mismatch-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.mismatch-badge.live {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}

.mismatch-badge.reg {
  background: #D1FAE5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.mismatch-vs-badge {
  font-weight: 900;
  font-size: 14px;
  color: #DC2626;
}

.mismatch-details-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  margin-bottom: 20px;
}

.mismatch-warning-text {
  border-left: 3px solid #EF4444;
  padding-left: 10px;
  margin-bottom: 12px;
}

.mobile-app-page-header {
  display: none;
}
.mobile-employees-list {
  display: none;
}

/* ===================================================================
   10. MOBILE BROWSER VIEW & RESPONSIVE APP-LIKE CONTROLS
   =================================================================== */
@media (max-width: 768px) {
  body {
    -webkit-tap-highlight-color: transparent;
  }

  .admin-sidebar {
    display: none !important;
  }

  .admin-layout-wrapper {
    flex-direction: column;
    padding-bottom: 74px; /* Space for sticky bottom bar */
  }

  .admin-main-area {
    padding: 10px 14px 84px 14px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Hide Desktop Top Header on Mobile (Prevents awkward double-cards and duplicate buttons) */
  .admin-header {
    display: none !important;
  }

  /* Mobile App Page Header & Staff Directory */
  .mobile-app-page-header {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .mobile-app-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 2px;
  }

  .mobile-page-heading {
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.4px;
    margin: 0;
    line-height: 1.2;
  }

  .mobile-page-subtext {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748B;
    margin: 2px 0 0 0;
  }

  .mobile-btn-add-emp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #F59E0B, #EA580C);
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .mobile-btn-add-emp:active {
    transform: scale(0.94);
  }

  .mobile-search-bar-wrap {
    position: relative;
    width: 100%;
  }

  .mobile-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #94A3B8;
    pointer-events: none;
  }

  .mobile-search-input {
    width: 100%;
    height: 44px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 0 14px 0 42px;
    font-size: 13.5px;
    color: #0F172A;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
    transition: all 0.2s ease;
  }

  .mobile-search-input:focus {
    outline: none;
    border-color: #EA580C;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
  }

  .mobile-filter-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .mobile-filter-chips-row::-webkit-scrollbar {
    display: none;
  }

  .mobile-chip {
    flex-shrink: 0;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
  }

  .mobile-chip.active {
    background: #0F172A;
    border-color: #0F172A;
    color: #FFFFFF;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
  }

  /* Hide Desktop Table on Mobile */
  #adminSubEmployees .table-toolbar {
    display: none !important;
  }
  #adminSubEmployees .table-responsive {
    display: none !important;
  }
  #adminSubEmployees .admin-table-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* Mobile Native Staff Cards */
  .mobile-employees-list {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-staff-card {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
  }

  .mobile-staff-card.is-super {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(180deg, #FFFDF9 0%, #FFFFFF 100%);
  }

  .mobile-staff-card.is-super::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #F59E0B, #EA580C);
  }

  .mobile-staff-top {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
  }

  .mobile-staff-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    background: #F8FAFC;
  }

  .mobile-staff-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 4px #10B981;
  }

  .mobile-staff-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .mobile-staff-name-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mobile-staff-name {
    font-size: 15px;
    font-weight: 800;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-role-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }

  .mobile-role-badge.super {
    background: rgba(245, 158, 11, 0.14);
    color: #D97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
  }

  .mobile-role-badge.tl {
    background: rgba(14, 165, 233, 0.14);
    color: #0284C7;
    border: 1px solid rgba(14, 165, 233, 0.35);
  }

  .mobile-role-badge.admin {
    background: rgba(99, 102, 241, 0.14);
    color: #4F46E5;
    border: 1px solid rgba(99, 102, 241, 0.35);
  }

  .mobile-role-badge.staff {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
  }

  .mobile-staff-subline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #64748B;
  }

  .mobile-staff-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
    color: #EA580C;
    background: rgba(234, 88, 12, 0.08);
    padding: 1px 6px;
    border-radius: 6px;
  }

  .mobile-staff-dot {
    color: #CBD5E1;
  }

  .mobile-staff-dept {
    font-weight: 600;
    color: #475569;
  }

  .mobile-staff-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .mobile-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .mobile-action-btn.edit {
    color: #D97706;
  }

  .mobile-action-btn.edit:active {
    background: #FEF3C7;
    border-color: #F59E0B;
  }

  .mobile-action-btn.delete {
    color: #EF4444;
  }

  .mobile-action-btn.delete:active {
    background: #FEE2E2;
    border-color: #EF4444;
  }

  .mobile-action-btn.lock {
    color: #94A3B8;
    opacity: 0.6;
    cursor: not-allowed;
  }

  .mobile-staff-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(241, 245, 249, 0.9);
    font-size: 11px;
  }

  .mobile-bio-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
  }

  .mobile-bio-tag.enrolled {
    color: #059669;
  }

  .bio-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 4px #10B981;
  }

  .mobile-email-tag {
    color: #94A3B8;
    font-size: 11px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .kpi-quad-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
  }

  .kpi-gold-card {
    padding: 16px 14px !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02) !important;
  }

  .kpi-count {
    font-size: 28px !important;
    font-weight: 800 !important;
  }

  .kpi-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1E293B !important;
    margin-top: 8px;
    margin-bottom: 2px;
  }

  .kpi-meta {
    font-size: 11px !important;
    color: #94A3B8 !important;
  }

  .kpi-icon-pill {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
    font-size: 15px !important;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .toolbar-actions input,
  .toolbar-actions select,
  .toolbar-actions button {
    flex: 1 1 calc(50% - 8px);
    min-width: 130px;
  }

  /* Reports Tiles Layout Fix on Mobile */
  .admin-table-card {
    padding: 14px 12px !important;
    border-radius: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .admin-tiles-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 14px !important;
  }

  .history-day-tile {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .day-tile-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .day-tile-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .day-tile-body {
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
  }

  .day-tile-punches {
    width: 100% !important;
    min-width: 0 !important;
  }

  .punch-stream-content {
    min-width: 0 !important;
  }

  .punch-stream-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .punch-time-bold {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    white-space: nowrap !important;
  }

  .day-tile-footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
  }

  /* Fixed Mobile Admin Bottom Navigation Bar */
  .mobile-admin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 1000;
    box-shadow: 0 -8px 24px -4px rgba(15, 23, 42, 0.06);
  }

  .mobile-admin-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #64748B;
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    padding: 6px 0;
    transition: all 0.2s ease;
  }

  .mobile-admin-nav-link svg {
    width: 20px;
    height: 20px;
  }

  .mobile-admin-nav-link.active {
    color: #EA580C;
    font-weight: 800;
  }

  .mobile-admin-nav-link.active svg {
    stroke: #EA580C;
  }

  .mobile-scan-fab {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #EA580C);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -18px;
    border: 3.5px solid #FFFFFF;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.45);
    color: #FFFFFF !important;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
  }

  .mobile-scan-fab:active {
    transform: scale(0.92);
  }

  .mobile-scan-fab svg,
  .mobile-admin-nav-link .mobile-scan-fab svg {
    width: 22px !important;
    height: 22px !important;
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    fill: none !important;
  }

  .mobile-scan-label {
    font-size: 11px;
    font-weight: 800;
    color: #D97706 !important;
    letter-spacing: 0.2px;
  }

  /* Mobile Brand Header Bar */
  .mobile-top-brand-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    height: 56px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 10px;
  }
}

@media (min-width: 769px) {
  .mobile-admin-bottom-nav {
    display: none !important;
  }
  .mobile-top-brand-bar {
    display: none !important;
  }
}

/* Live GPS Radar and Active Staff Marker Styles */
.live-gps-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radar-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.45);
  animation: pulseRadar 2s infinite ease-out;
  pointer-events: none;
}

@keyframes pulseRadar {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.live-staff-roster-card {
  background: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.live-staff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.live-staff-card:hover {
  border-color: #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
  background: #FFFFFF;
}

.live-staff-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #10B981;
  object-fit: cover;
  flex-shrink: 0;
}

.live-staff-info {
  flex: 1;
  min-width: 0;
}

.live-staff-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-heading, #0F172A);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-staff-meta {
  font-size: 11px;
  color: var(--text-muted, #64748B);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-staff-loc {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-locate-staff {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-locate-staff:hover {
  background: #10B981;
  color: #FFFFFF;
}

/* ===================================================================
   ATTENDANCE FULL LOCATION HISTORY & GPS TRAIL MODAL
   =================================================================== */
.history-day-tile.clickable {
  cursor: pointer;
}
.history-day-tile.clickable:hover {
  border-color: var(--gold-primary, #F59E0B);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btn-location-history-pill {
  background: rgba(37, 99, 235, 0.08);
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-location-history-pill:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.location-modal-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.location-modal-body {
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location-punch-card {
  background: var(--surface-2, #F8FAFC);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: 10px;
  padding: 14px;
}

.location-punch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light, #E2E8F0);
}

.location-full-address {
  font-size: 12px;
  color: var(--text-heading, #0F172A);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  word-break: break-word;
}

.location-coords-badge {
  font-size: 11px;
  font-family: monospace;
  color: #475569;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-google-maps {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid #CBD5E1;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-google-maps:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

/* Chronological Trail */
.location-trail-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 20px;
}
.location-trail-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #E2E8F0;
}

.trail-item {
  position: relative;
  font-size: 12px;
}
.trail-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563EB;
  box-shadow: 0 0 0 3px #DBEAFE;
}
.trail-dot.in {
  background: #059669;
  box-shadow: 0 0 0 3px #D1FAE5;
}
.trail-dot.out {
  background: #EA580C;
  box-shadow: 0 0 0 3px #FFEDD5;
}
.trail-dot.ping {
  background: #3B82F6;
  box-shadow: 0 0 0 2px #EFF6FF;
}
