/* ==========================================================================
   FMCU VISIT STORE REPORT - Corporate Clean White & Green/Teal UI System
   ========================================================================== */

:root {
  --fm-green: #009944;
  --fm-green-dark: #007a37;
  --fm-green-light: #e6f7ee;
  --fm-teal: #0099a6;
  --fm-teal-dark: #007c87;
  --fm-teal-light: #e6f6f8;
  --fm-blue: #0080c6;
  --bg-surface: #ffffff;
  --bg-muted: #f8fafc;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeSpeed;
}

body {
  background-color: #f4f7f9;
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fast tap response for touch devices (iOS Safari, Android Chrome) */
button, a, input, select, textarea, [role="button"], label {
  touch-action: manipulation;
}

/* Native smooth momentum scrolling on iOS Safari */
html, body, .overflow-y-auto, .overflow-x-auto, .scrollable, [class*="overflow-"] {
  -webkit-overflow-scrolling: touch;
}

/* Hardware accelerated transitions without CPU layout thrashing */
.view-section {
  transform: translateZ(0);
  contain: layout style;
  animation: fadeSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.hidden,
.view-pane.hidden,
[id^="view-"].hidden {
  display: none !important;
  content-visibility: hidden;
  contain: strict;
}

/* Isolate Form and Admin cards from layout reflows */
.form-section-card,
.admin-card-section {
  contain: content;
}

/* High-performance off-screen content skipping for long lists (Android, iOS 18+, Desktop) */
#home-schedule-list > div, #home-history-list > div, #admin-sch-history-list > div {
  content-visibility: auto;
  contain-intrinsic-size: 0 110px;
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

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

.gps-pulse {
  animation: pulseRing 2s infinite;
}

/* Interactive Card Hover Effects */
.fm-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fm-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 153, 166, 0.12), 0 4px 8px -4px rgba(15, 23, 42, 0.04);
  border-color: rgba(0, 153, 166, 0.35);
}

/* Brand Gradient Accent */
.fm-gradient {
  background: linear-gradient(135deg, #009944 0%, #0099a6 100%);
}

.fm-gradient-subtle {
  background: linear-gradient(135deg, rgba(0, 153, 68, 0.07) 0%, rgba(0, 153, 166, 0.09) 100%);
}

.fm-top-stripe {
  background: linear-gradient(90deg, #009944 0%, #009944 45%, #ffffff 45%, #ffffff 50%, #0080c6 50%, #0080c6 100%);
  height: 5px;
}

/* Navigation Active States */
.nav-item {
  transition: all 0.2s ease;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 153, 68, 0.1) 0%, rgba(0, 153, 166, 0.12) 100%);
  color: #007a37;
  font-weight: 700;
  border-right: 3px solid #009944;
}

.mobile-nav-item {
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item.active {
  color: #009944 !important;
  font-weight: 800;
}

.mobile-nav-item.active i {
  color: #009944 !important;
  transform: translateY(-1px);
}

/* 16:9 Widescreen Slide Preview Container for PDF Preview Page */
.pdf-slide-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.08);
  container-type: inline-size;
}

.pdf-slide-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  user-select: none;
  background: #ffffff;
  font-family: Helvetica, Arial, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Form Input Focus */
.fm-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #0f172a;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fm-input:focus {
  outline: none;
  border-color: #0099a6;
  box-shadow: 0 0 0 3px rgba(0, 153, 166, 0.15);
}

.fm-input:disabled, .fm-input[readonly] {
  background-color: #f8fafc;
  color: #64748b;
}

/* Map Container */
.leaflet-container {
  font-family: inherit;
  z-index: 10 !important;
}

/* Mobile Intro Splash Loading Animations before Login Form */
@keyframes splashCardIn {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splashProgressFill {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.splash-anim-1 {
  opacity: 0;
  animation: splashCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
}

.splash-anim-2 {
  opacity: 0;
  animation: splashCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.splash-anim-3 {
  opacity: 0;
  animation: splashCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.42s forwards;
}

.splash-anim-4 {
  opacity: 0;
  animation: splashCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.58s forwards;
}

.splash-progress-bar {
  width: 0%;
  animation: splashProgressFill 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}


/* ==========================================================================
   INTERACTIVE REVAMP UI/UX (POINTS 1 - 8 & SKELETON SHIMMER)
   ========================================================================== */

/* Shimmer Skeleton Loading */
@keyframes fmShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fm-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: fmShimmer 1.5s infinite;
  border-radius: 0.75rem;
}

/* Voice-to-Text Recording Pulse Animation */
@keyframes micPulseWave {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mic-recording {
  animation: micPulseWave 1.4s infinite !important;
  background-color: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

/* Radar Sweep Ripple Effect on Leaflet Marker */
@keyframes radarSweepRing {
  0% {
    transform: scale(0.6);
    opacity: 0.85;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

.radar-sweep-ring {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  border-radius: 50%;
  border: 2px solid #009944;
  background: rgba(0, 153, 68, 0.25);
  animation: radarSweepRing 2.4s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
  pointer-events: none;
}

/* Camera Viewfinder Rule-of-Thirds Grid */
.viewfinder-grid {
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}

/* Circular Progress Ring */
.progress-ring-circle {
  transition: stroke-dashoffset 0.45s ease-in-out;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

@media (max-width: 640px) {
  .pdf-slide-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.08);
  }
  .pdf-slide-canvas {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* Hide scrollbar for clean horizontal tab sliding */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Prevent iOS Safari & Android Mobile Viewport Auto-Zoom on Input Focus */
@media screen and (max-width: 768px) {
  input,
  select,
  textarea,
  .fm-input {
    font-size: 16px !important;
  }
}

#login-username,
#login-password,
#custom-user-select-btn,
#custom-user-search-input {
  font-size: 16px !important;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

/* Custom User Dropdown Menu Scrollbar, Stacking & Clipping Fix */
#custom-user-select-container {
  position: relative;
  z-index: 30;
}

#custom-user-select-container.is-open {
  z-index: 70 !important;
}

#custom-user-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100 !important;
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.1);
}

#auth-screen > div,
#auth-login-panel,
#auth-login-panel > div,
#login-form {
  overflow: visible !important;
}

/* Ensure Rounded Corners for Login Screen Card & Header */
#auth-screen > div {
  border-radius: 1.5rem !important;
}

@media (max-width: 1023px) {
  #auth-splash-panel,
  #auth-login-panel {
    border-radius: 1.5rem !important;
  }
  #auth-login-panel > div:first-child {
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  #auth-splash-panel {
    border-top-left-radius: 1.5rem !important;
    border-bottom-left-radius: 1.5rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }
  #auth-login-panel {
    border-top-right-radius: 1.5rem !important;
    border-bottom-right-radius: 1.5rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }
}


#custom-user-options-list::-webkit-scrollbar {
  width: 5px;
}
#custom-user-options-list::-webkit-scrollbar-track {
  background: transparent;
}
#custom-user-options-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
#custom-user-options-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   T.A.R.O (Trainer Asyik Rekan Operasional) AI 3D Mascot Animations & Styles
   ========================================================================== */
@keyframes taroMascotFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes taroMascotShadow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(0.78);
    opacity: 0.18;
  }
}

@keyframes taroMascotAura {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.1);
  }
}

@keyframes taroMascotJump {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  30% {
    transform: translateY(-10px) scale(1.12) rotate(-3deg);
  }
  65% {
    transform: translateY(1px) scale(0.96) rotate(1.5deg);
  }
}

@keyframes taroSoundWave {
  0%, 100% {
    height: 3px;
  }
  50% {
    height: 9px;
  }
}

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

.taro-mascot-floating {
  animation: taroMascotFloat 3.6s ease-in-out infinite;
  transform-origin: center bottom;
  will-change: transform;
}

.taro-mascot-shadow-anim {
  animation: taroMascotShadow 3.6s ease-in-out infinite;
  transform-origin: center center;
}

.taro-mascot-aura-anim {
  animation: taroMascotAura 2.8s ease-in-out infinite;
}

.taro-mascot-jump-anim {
  animation: taroMascotJump 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.taro-mascot-img {
  mix-blend-mode: multiply;
  filter: brightness(1.015);
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes taroCursorBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.taro-typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  width: 2.5px;
  height: 1.1em;
  vertical-align: -0.15em;
  background-color: #009944;
  border-radius: 1px;
  animation: taroCursorBlink 0.65s step-end infinite;
}

.taro-sound-bar {
  width: 2px;
  background-color: currentColor;
  border-radius: 9999px;
  display: inline-block;
  animation: taroSoundWave 0.85s ease-in-out infinite alternate;
}
.taro-sound-bar.bar-1 { animation-delay: 0.0s; }
.taro-sound-bar.bar-2 { animation-delay: 0.28s; }
.taro-sound-bar.bar-3 { animation-delay: 0.56s; }

.taro-slide-fade-in {
  animation: taroSlideFadeIn 0.35s ease-out forwards;
}

/* Custom mini scrollbar for TARO slide body */
#taro-slide-body::-webkit-scrollbar,
#taro-expanded-content::-webkit-scrollbar {
  width: 4px;
}
#taro-slide-body::-webkit-scrollbar-track,
#taro-expanded-content::-webkit-scrollbar-track {
  background: transparent;
}
#taro-slide-body::-webkit-scrollbar-thumb,
#taro-expanded-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
#taro-slide-body::-webkit-scrollbar-thumb:hover,
#taro-expanded-content::-webkit-scrollbar-thumb:hover {
  background: #009944;
}

/* Fixed height and full justify for TARO slide body */
#taro-slide-body {
  text-align: justify;
  text-justify: inter-word;
}
#taro-slide-body p,
#taro-slide-body li {
  text-align: justify;
  text-justify: inter-word;
}

/* Auto-expand Textareas in Observation Cards */
.fm-auto-textarea {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  overflow: hidden;
  resize: none;
  field-sizing: content;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  contain: layout paint;
}

/* Mobile Date Input normalization & alignment */
input[type="date"].fm-input,
input[type="date"] {
  max-width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  line-height: 1.25;
}
input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

/* Floating Evidence Action Buttons */
.floating-fab-btn {
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2), 0 2px 6px 0 rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.floating-fab-btn:active {
  transform: scale(0.92);
}

/* Bulletproof iOS Toggle Switch */
.fm-toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.fm-toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.fm-toggle-track {
  width: 44px;
  height: 24px;
  background-color: #cbd5e1; /* slate-300 */
  border-radius: 9999px;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  display: block;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}
.fm-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fm-toggle-switch input:checked + .fm-toggle-track {
  background-color: #009944; /* FamilyMart green */
}
.fm-toggle-switch input:checked + .fm-toggle-track .fm-toggle-knob {
  transform: translateX(20px);
}

/* Floating Action Buttons with High Visual Depth */
.floating-elevated-fab {
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.3), 0 4px 10px -2px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.floating-elevated-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 28px -3px rgba(0, 0, 0, 0.35), 0 6px 12px -2px rgba(0, 0, 0, 0.2);
}
.floating-elevated-fab:active {
  transform: translateY(1px) scale(0.94);
  box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.25);
}

/* Floating Action Button with Deep Blur Shadow (Efek Kedalaman & Standby) */
.floating-fab-glow {
  box-shadow: 0 12px 28px -4px rgba(0, 153, 68, 0.6), 0 6px 16px -2px rgba(0, 0, 0, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  backdrop-filter: blur(8px);
}
.floating-fab-glow:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 36px -4px rgba(0, 153, 68, 0.72), 0 8px 20px -2px rgba(0, 0, 0, 0.28);
}
.floating-fab-glow:active {
  transform: translateY(1px) scale(0.93);
  box-shadow: 0 6px 16px -2px rgba(0, 153, 68, 0.5);
}

.floating-fab-glow-dark {
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.65), 0 6px 16px -2px rgba(0, 0, 0, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  backdrop-filter: blur(8px);
}
.floating-fab-glow-dark:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.8), 0 8px 20px -2px rgba(0, 0, 0, 0.3);
}
.floating-fab-glow-dark:active {
  transform: translateY(1px) scale(0.93);
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.5);
}

/* Sub-section Switcher Pill Button */
.form-subtab-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.form-subtab-pill.active {
  background-color: #009944;
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(0, 153, 68, 0.35);
}
.form-subtab-pill:not(.active) {
  background-color: #ffffff;
  color: #334155;
  border-color: #e2e8f0;
}
.form-subtab-pill:not(.active):hover {
  background-color: #f8fafc;
  color: #0f172a;
}

/* Photo Editor Canvas Styles */
#photo-editor-canvas {
  touch-action: none;
  cursor: crosshair;
}




/* Compact Toggle Switch for Sub-Tabs */
.fm-toggle-sm .fm-toggle-track {
  width: 34px;
  height: 20px;
}
.fm-toggle-sm .fm-toggle-knob {
  width: 14px;
  height: 14px;
  top: 3px;
  left: 3px;
}
.fm-toggle-sm input:checked + .fm-toggle-track .fm-toggle-knob {
  transform: translateX(14px);
}

/* High Contrast Toggle Switch inside Active Green Sub-Tab Pill */
.form-subtab-pill.active .fm-toggle-track {
  background-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}
.form-subtab-pill.active .fm-toggle-switch input:checked + .fm-toggle-track {
  background-color: #ffffff;
}
.form-subtab-pill.active .fm-toggle-switch input:checked + .fm-toggle-track .fm-toggle-knob {
  background-color: #009944;
}


/* ==========================================================================
   RUNNING TEXT (MARQUEE) FOR PREVIEW DROPDOWN & LONG DOCUMENT TITLES
   ========================================================================== */
.running-text-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}

.running-text-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}

.running-text-track.is-running {
  animation: fmcuMarqueeScroll 20s linear infinite;
}

.running-text-container:hover .running-text-track.is-running,
.running-text-container:active .running-text-track.is-running {
  animation-play-state: paused;
}

@keyframes fmcuMarqueeScroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Custom Dropdown Trigger for Preview Report */
.preview-report-custom-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  min-height: 32px;
  max-width: 100%;
}

.preview-report-custom-btn:hover {
  border-color: #0099a6;
  box-shadow: 0 1px 3px rgba(0, 153, 166, 0.15);
}

/* Responsive PDF Canvas Container for Mobile Fit */
.pdf-canvas-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border-radius: 1rem;
  padding: 0.5rem;
  overflow-x: hidden;
}

.pdf-canvas-container canvas {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.08);
}

/* Accessibility (WCAG 2.1 AA): Skip to Main Content & Keyboard Focus Ring */
.skip-to-main-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: #009944;
  color: #ffffff;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-to-main-link:focus {
  top: 0.75rem;
  outline: 3px solid #0080c6;
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid #009944;
  outline-offset: 2px;
}

/* Accessibility: Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Stylesheet for Audit & Report Printouts */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  aside,
  header,
  nav,
  #mobile-bottom-nav,
  #gps-gate-screen,
  #notification-gate-screen,
  #auth-screen {
    display: none !important;
  }
  main,
  .view-section {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   Smooth & Stable 16:9 PDF Preview Styles (Anti-Jank, Zero CLS, 60fps)
   ========================================================================== */
.pdf-page-card {
  contain: layout style paint;
  content-visibility: auto;
  contain-intrinsic-size: 800px 480px;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.pdf-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f1f5f9;
  overflow: hidden;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-canvas-wrapper canvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  max-height: 85vh;
  display: block;
}

/* ==========================================================================
   Form Top Geofence Live Check-In Banner (Actual In / Out & GPS)
   Restoring rich dark-green emerald/teal gradient and high-contrast badges
   ========================================================================== */
#form-top-geofence-banner,
div#form-top-geofence-banner,
.form-top-geofence-banner {
  background: linear-gradient(135deg, #022c22 0%, #042f2e 50%, #0f172a 100%) !important;
  background-color: #022c22 !important;
  color: #ffffff !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  border-radius: 1rem !important;
  box-shadow: 0 10px 25px -5px rgba(2, 44, 34, 0.5), 0 8px 10px -6px rgba(2, 44, 34, 0.4) !important;
}

#form-top-geofence-banner #form-banner-title {
  color: #ffffff !important;
  font-weight: 800 !important;
}

#form-top-geofence-banner #form-banner-store-badge {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #99f6e4 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

#form-top-geofence-banner #form-banner-gps {
  color: #cbd5e1 !important;
}

#form-top-geofence-banner #form-banner-gps i {
  color: #34d399 !important;
}

#form-top-geofence-banner #form-live-autosave-badge {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #a7f3d0 !important;
}

#form-top-geofence-banner #form-progress-ring-text {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* Side-by-Side Actual In & Actual Out Cards */
#form-top-geofence-banner .form-actual-in-card {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  border-radius: 0.75rem !important;
}

#form-top-geofence-banner .form-actual-in-card .card-title,
#form-top-geofence-banner .form-actual-in-card .card-title span,
#form-top-geofence-banner .form-actual-in-card .card-title i {
  color: #6ee7b7 !important;
}

#form-top-geofence-banner .form-actual-in-card .card-subtitle {
  color: rgba(167, 243, 208, 0.85) !important;
}

#form-top-geofence-banner .form-actual-out-card {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 0.75rem !important;
}

#form-top-geofence-banner .form-actual-out-card .card-title,
#form-top-geofence-banner .form-actual-out-card .card-title span,
#form-top-geofence-banner .form-actual-out-card .card-title i {
  color: #fcd34d !important;
}

#form-top-geofence-banner .form-actual-out-card .card-subtitle {
  color: rgba(253, 230, 138, 0.85) !important;
}

#form-top-geofence-banner #form-actual-in,
#form-top-geofence-banner #form-actual-out {
  color: #ffffff !important;
  font-weight: 800 !important;
}

#form-top-geofence-banner #form-actual-in::placeholder,
#form-top-geofence-banner #form-actual-out::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Radar Geofence Pill & States */
#form-geofence-radar-pill {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  border-radius: 0.75rem !important;
  padding: 0.5rem 0.625rem !important;
  transition: all 0.25s ease-in-out !important;
}

/* State Inside (Green) */
#form-geofence-radar-pill.state-inside,
#form-geofence-radar-pill.bg-emerald-500\/20 {
  background: rgba(6, 78, 59, 0.6) !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
}
#form-geofence-radar-pill.state-inside #form-geofence-radar-title,
#form-geofence-radar-pill.bg-emerald-500\/20 #form-geofence-radar-title {
  color: #a7f3d0 !important;
}
#form-geofence-radar-pill.state-inside #form-geofence-radar-desc,
#form-geofence-radar-pill.bg-emerald-500\/20 #form-geofence-radar-desc {
  color: rgba(110, 231, 183, 0.95) !important;
}

/* State Completed (Teal) */
#form-geofence-radar-pill.state-completed,
#form-geofence-radar-pill.bg-teal-500\/20 {
  background: rgba(19, 78, 74, 0.6) !important;
  border: 1px solid rgba(45, 212, 191, 0.5) !important;
}
#form-geofence-radar-pill.state-completed #form-geofence-radar-title,
#form-geofence-radar-pill.bg-teal-500\/20 #form-geofence-radar-title {
  color: #99f6e4 !important;
}
#form-geofence-radar-pill.state-completed #form-geofence-radar-desc,
#form-geofence-radar-pill.bg-teal-500\/20 #form-geofence-radar-desc {
  color: rgba(94, 234, 212, 0.95) !important;
}

/* State Outside Denied In (Rose) */
#form-geofence-radar-pill.state-outside-in,
#form-geofence-radar-pill.bg-rose-500\/20 {
  background: rgba(136, 19, 55, 0.6) !important;
  border: 1px solid rgba(251, 113, 133, 0.5) !important;
}
#form-geofence-radar-pill.state-outside-in #form-geofence-radar-title,
#form-geofence-radar-pill.bg-rose-500\/20 #form-geofence-radar-title {
  color: #fecdd3 !important;
}
#form-geofence-radar-pill.state-outside-in #form-geofence-radar-desc,
#form-geofence-radar-pill.bg-rose-500\/20 #form-geofence-radar-desc {
  color: rgba(253, 164, 175, 0.95) !important;
}

/* State Outside Denied Out (Amber) */
#form-geofence-radar-pill.state-outside-out,
#form-geofence-radar-pill.state-no-coords,
#form-geofence-radar-pill.bg-amber-500\/20 {
  background: rgba(120, 53, 15, 0.65) !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
}
#form-geofence-radar-pill.state-outside-out #form-geofence-radar-title,
#form-geofence-radar-pill.state-no-coords #form-geofence-radar-title,
#form-geofence-radar-pill.bg-amber-500\/20 #form-geofence-radar-title {
  color: #fde68a !important;
}
#form-geofence-radar-pill.state-outside-out #form-geofence-radar-desc,
#form-geofence-radar-pill.state-no-coords #form-geofence-radar-desc,
#form-geofence-radar-pill.bg-amber-500\/20 #form-geofence-radar-desc {
  color: rgba(254, 240, 138, 0.95) !important;
}

/* State No GPS (Slate) */
#form-geofence-radar-pill.state-no-gps,
#form-geofence-radar-pill.bg-slate-500\/20 {
  background: rgba(51, 65, 85, 0.65) !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
}
#form-geofence-radar-pill.state-no-gps #form-geofence-radar-title,
#form-geofence-radar-pill.bg-slate-500\/20 #form-geofence-radar-title {
  color: #e2e8f0 !important;
}
#form-geofence-radar-pill.state-no-gps #form-geofence-radar-desc,
#form-geofence-radar-pill.bg-slate-500\/20 #form-geofence-radar-desc {
  color: rgba(203, 213, 225, 0.9) !important;
}

/* Refresh GPS Button */
#form-geofence-radar-pill button {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.25) !important;
}
#form-geofence-radar-pill button:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}
