/* ============================================================================
   styles.css — iOS Clean Gray & White (Mobile-First & Desktop Optimized)
   ============================================================================ */

:root {
  --ios-bg: #F2F2F7;
  --ios-card: rgba(255, 255, 255, 0.92);
  --ios-card-solid: #FFFFFF;
  --ios-border: rgba(60, 60, 67, 0.12);
  --ios-text: #1C1C1E;
  --ios-subtext: #6C6C70;
  --ios-blue: #007AFF;
  --ios-green: #34C759;
  --ios-amber: #FF9500;
  --ios-red: #FF3B30;
}

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

body {
  background: linear-gradient(180deg, #F7F7FA 0%, #EFEFF4 55%, #E5E5EA 100%);
  color: var(--ios-text);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Glass Card Clean iOS */
.ios-glass {
  background: var(--ios-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 26px -6px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
}

.ios-glass-light {
  background: #F4F4F8;
  border: 1px solid rgba(60, 60, 67, 0.09);
}

/* Input iOS Clean (Font size 16px di HP agar iOS Safari tidak auto-zoom saat klik input) */
.ios-input {
  background: #FFFFFF;
  border: 1px solid rgba(60, 60, 67, 0.16);
  color: #1C1C1E;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (max-width: 640px) {
  input.ios-input,
  select.ios-input,
  textarea.ios-input {
    font-size: 16px !important;
  }
}

.ios-input::placeholder {
  color: #8E8E93;
  font-size: 0.82rem;
}

.ios-input:focus {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3.5px rgba(0, 122, 255, 0.16);
  outline: none;
}

.ios-btn {
  transition: transform 0.14s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  user-select: none;
}

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

/* Mobile Floating Bottom Navigation Bar (Khusus Layar HP) */
.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-top: 1px solid rgba(60, 60, 67, 0.12);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Splash Screen & Refresh Overlay Animation */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(242, 242, 247, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.splash-overlay.hidden-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-pulse {
  animation: pulseFloat 2s infinite ease-in-out;
}

@keyframes pulseFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.04); }
}

.ios-progress-bar {
  width: 180px;
  height: 5px;
  background: rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.ios-progress-fill {
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #007AFF, #34C759);
  border-radius: 999px;
  animation: slideProgress 1.15s infinite ease-in-out;
}

@keyframes slideProgress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(240%); }
}

/* Popup Kamera Scanner Modern (Gaya ADF Report) */
#scannerModalViewport video,
#scannerModalViewport canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 1rem;
}

#scannerModalViewport canvas.drawingBuffer {
  position: absolute;
  top: 0;
  left: 0;
}

.scanner-laser-line {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #FF3B30, #FF9500, #FF3B30, transparent);
  box-shadow: 0 0 12px 2px rgba(255, 59, 48, 0.85);
  border-radius: 999px;
  animation: laserScanMove 2.1s infinite ease-in-out;
  pointer-events: none;
  z-index: 20;
}

@keyframes laserScanMove {
  0%, 100% { top: 18%; }
  50% { top: 82%; }
}

/* SweetAlert2 Center Popup Customization (Selalu di Tengah & Rapi di HP) */
.swal2-popup {
  border-radius: 1.5rem !important;
  padding: 1.25rem !important;
  font-family: inherit !important;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: #F2F2F7;
}
::-webkit-scrollbar-thumb {
  background: #C7C7CC;
  border-radius: 9999px;
}
