/* ==========================================================================
   Scanner Panitia — Gathering Ditsy ke-5  (v2.0 Premium Mobile)
   ========================================================================== */

/* ── Wrapper ────────────────────────────────────────────── */
.scanner-wrapper {
  max-width: 540px;
  margin: 0 auto;
  padding: 1rem 1rem calc(var(--nav-height) + 1.5rem) 1rem;
}

/* ── Role Scanner (Tanpa Bottom Nav) ─────────────────────── */
body.role-scanner .mobile-nav-bar {
  display: none !important;
}

body.role-scanner .scanner-wrapper {
  padding-bottom: 2rem !important;
}

body.role-scanner .scanner-fab {
  bottom: 1.5rem !important;
}

@media (max-width: 480px) {
  body.role-scanner .scanner-fab {
    bottom: 1rem !important;
  }
}

/* ── Header Card (Compact & Neat) ────────────────────────── */
.scanner-header-card {
  background: var(--gradient-rose);
  border-radius: 18px;
  padding: 0.8rem 1rem 0.85rem 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(133, 66, 55, 0.32);
}

.scanner-header-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -15%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.scanner-header-card::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: -10%;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.scanner-header-card h1 {
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 800;
  color: #FFFDF9 !important;
  position: relative;
  z-index: 1;
  margin-bottom: 0.12rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.scanner-header-card p {
  color: rgba(255, 253, 249, 0.88) !important;
  font-size: 0.72rem;
  position: relative;
  z-index: 1;
  line-height: 1.3;
  margin: 0;
  font-weight: 500;
}

.scanner-badge-panitia {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.20);
  color: #FFFDF9;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0;
  border: 1px solid rgba(255,255,255,0.30);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Camera Viewport ────────────────────────────────────── */
.scanner-view-card {
  background: #0D0A0A;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.50);
  position: relative;
  margin-bottom: 1.1rem;
  border: 2px solid rgba(194, 125, 107, 0.55);
}

.scanner-viewport-box {
  position: relative;
  width: 100%;
  min-height: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0D0A0A;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Idle State Placeholder */
.scanner-idle-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1F1311 0%, #0D0A0A 100%);
  color: rgba(255, 253, 249, 0.85);
  z-index: 5;
  text-align: center;
  padding: 1.5rem;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.scanner-viewport-box.scanning .scanner-idle-placeholder {
  opacity: 0;
  display: none;
}

.scanner-idle-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(194, 125, 107, 0.15);
  border: 1.5px solid rgba(194, 125, 107, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-rose-gold);
  margin-bottom: 0.75rem;
}

.scanner-idle-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: #FFFDF9;
  margin-bottom: 0.25rem;
}

.scanner-idle-hint {
  font-size: 0.72rem;
  color: rgba(255, 253, 249, 0.55);
  max-width: 250px;
  line-height: 1.4;
}

#reader {
  width: 100% !important;
  height: 100% !important;
  min-height: 280px;
  border: none !important;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Scanner Overlay & Reticle — only show when scanning */
.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.scanner-viewport-box.scanning .scanner-overlay {
  display: flex;
}

.scanner-frame-target {
  width: min(86%, 310px);
  height: min(76%, 250px);
  position: relative;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  border-radius: 20px;
  transition: all 0.25s ease;
}

.scanner-frame-target.zoomed {
  transform: scale(1.05);
}

.scan-laser-line {
  position: absolute;
  top: 10px;
  left: 8px;
  right: 8px;
  height: 2.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(229, 152, 134, 0.6) 15%,
    #FFFDF9 50%,
    rgba(229, 152, 134, 0.6) 85%,
    transparent 100%
  );
  box-shadow: 0 0 16px 3px rgba(229, 152, 134, 0.75);
  border-radius: 2px;
  animation: scanLaserAnim 1.4s ease-in-out infinite alternate;
}

@keyframes scanLaserAnim {
  0%   { top: 10px;  opacity: 0.65; }
  50%  { opacity: 1; }
  100% { top: calc(100% - 14px); opacity: 0.65; }
}

.reticle-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: #E59886;
  border-style: solid;
  border-width: 0;
  transition: all 0.2s ease;
}

.reticle-corner.tl { top: 0; left: 0; border-top-width: 3.5px; border-left-width: 3.5px;   border-top-left-radius: 16px; }
.reticle-corner.tr { top: 0; right: 0; border-top-width: 3.5px; border-right-width: 3.5px;  border-top-right-radius: 16px; }
.reticle-corner.bl { bottom: 0; left: 0; border-bottom-width: 3.5px; border-left-width: 3.5px;  border-bottom-left-radius: 16px; }
.reticle-corner.br { bottom: 0; right: 0; border-bottom-width: 3.5px; border-right-width: 3.5px; border-bottom-right-radius: 16px; }

/* Floating Controls inside Viewport (Zoom, Torch, Mode) */
.scanner-viewport-top-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
  pointer-events: auto;
}

.scanner-hd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.55);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.scanner-zoom-floating-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(18, 14, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 3px 6px;
  border-radius: 99px;
  z-index: 15;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.btn-zoom-pill {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-zoom-pill.active {
  background: var(--color-rose-deep, #854442);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(133, 68, 66, 0.5);
}

.scanner-distance-hint {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FEF3C7;
  border: 1px solid rgba(252, 211, 77, 0.35);
  font-size: 0.63rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 99px;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.btn-torch-toggle {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.btn-torch-toggle.active {
  background: #F59E0B;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

/* Camera Controls Bar */
.scanner-controls-bar {
  padding: 0.85rem 1rem;
  background: #181010;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.scanner-controls-bar .btn {
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-flip-cam {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #FFFDF9;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.btn-flip-cam:hover {
  background: rgba(255,255,255,0.22);
}

.btn-upload-qr {
  background: rgba(194, 125, 107, 0.2);
  border: 1px solid var(--color-rose-gold);
  color: #FFFDF9;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.btn-upload-qr:hover {
  background: rgba(194, 125, 107, 0.35);
}

#scannerStatusText {
  padding: 0.55rem 1rem;
  background: #0D0A0A;
  font-size: 0.76rem;
  text-align: center;
  color: rgba(255, 253, 249, 0.65);
  border-top: 1px solid rgba(255,255,255,0.04);
  line-height: 1.4;
}

/* HTTP Notice */
.scanner-http-notice {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin-top: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.73rem;
  color: #92400E;
  line-height: 1.45;
}

.scanner-http-notice i {
  font-size: 1.15rem;
  color: #D97706;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ── Manual Search Box ──────────────────────────────────── */
.manual-input-box {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.1rem;
  position: relative;
  overflow: visible;
}

.manual-input-box:focus-within {
  border-color: var(--color-rose-gold);
  box-shadow: 0 0 0 3px rgba(194, 125, 107, 0.12), var(--shadow-md);
}

.manual-search-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.manual-search-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-charcoal);
}

.manual-search-desc {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 0.1rem;
  line-height: 1.4;
}

.tag-no-camera {
  font-size: 0.65rem;
  color: var(--color-rose-deep);
  font-weight: 700;
  background: var(--color-blush-soft);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-rose-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

#manualGuestInput {
  background: var(--color-cream-bg);
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  transition: all 0.18s ease;
}

#manualGuestInput:focus {
  background: #FFFFFF;
  border-color: var(--color-rose-gold);
  box-shadow: 0 0 0 3px rgba(194, 125, 107, 0.12);
  outline: none;
}

/* Quick Access Chips */
.quick-chips-label {
  font-size: 0.7rem;
  color: var(--color-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-sim-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-sim-chip {
  background: var(--color-cream-bg);
  border: 1.5px solid var(--color-border);
  color: var(--color-charcoal-soft);
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

.btn-sim-chip:hover,
.btn-sim-chip:active {
  background: var(--color-blush-soft);
  border-color: var(--color-rose-deep);
  color: var(--color-rose-deep);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(133, 66, 55, 0.15);
}

/* Autocomplete Dropdown */
#searchDropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--color-rose-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 36px rgba(133, 66, 55, 0.18);
  z-index: 500;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

/* ── Recent Log Card ────────────────────────────────────── */
.recent-logs-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.logs-title-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.logs-title-group p {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 0.1rem;
}

.logs-count-badge {
  text-align: right;
}

.logs-count-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-rose-deep);
  font-family: var(--font-sans);
  line-height: 1;
  letter-spacing: -0.03em;
}

.logs-count-label {
  font-size: 0.68rem;
  color: var(--color-muted);
  display: block;
  margin-top: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--color-cream-bg);
  border-left: 3.5px solid var(--color-sage);
  font-size: 0.83rem;
  transition: all 0.15s ease;
  gap: 0.5rem;
}

.log-item:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-xs);
  border-left-color: var(--color-rose-gold);
}

/* ── Result Modal ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 10, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFCF9;
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 -12px 56px rgba(133, 66, 55, 0.22), 0 -2px 12px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.15, 0.64, 1);
  text-align: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.modal-backdrop.show .modal-card {
  transform: translateY(0);
}

.modal-handle {
  width: 44px;
  height: 4px;
  background: rgba(0,0,0,0.10);
  border-radius: 2px;
  margin: 0.85rem auto 0 auto;
}

/* ── Colored top accent strip per type ─────────────────── */
.modal-card.success   { border-top: 5px solid #22C55E; }
.modal-card.duplicate { border-top: 5px solid #EF4444; }
.modal-card.warning   { border-top: 5px solid #F59E0B; }
.modal-card.wrong_session { border-top: 5px solid #F59E0B; }
.modal-card.error     { border-top: 5px solid #EF4444; }

/* ── Icon Header ────────────────────────────────────────── */
.modal-icon-header {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-icon-bubble {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
  position: relative;
}

/* Bubble gradients per type */
.modal-card.success   .modal-icon-bubble {
  background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  border: 3px solid #6EE7B7;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
  color: #059669;
}
.modal-card.duplicate .modal-icon-bubble {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border: 3px solid #FCA5A5;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.22);
  color: #DC2626;
}
.modal-card.warning   .modal-icon-bubble,
.modal-card.wrong_session .modal-icon-bubble {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 3px solid #FCD34D;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.22);
  color: #D97706;
}
.modal-card.error .modal-icon-bubble {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border: 3px solid #FCA5A5;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.22);
  color: #DC2626;
}

.modal-icon-header h2 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.modal-card.success   .modal-icon-header h2 { color: #15803D; }
.modal-card.duplicate .modal-icon-header h2 { color: #B91C1C; }
.modal-card.warning   .modal-icon-header h2,
.modal-card.wrong_session .modal-icon-header h2 { color: #B45309; }
.modal-card.error     .modal-icon-header h2 { color: #B91C1C; }

/* ── Modal Body ─────────────────────────────────────────── */
.modal-body {
  padding: 0 1.35rem 1.75rem 1.35rem;
}

#modalMessage {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin: 0.5rem 0 0.75rem 0;
}

.modal-guest-box {
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0;
  margin: 0.5rem 0 0.85rem 0;
  border: none;
  text-align: left;
}

/* ── Guest Result Card (success / warning) ──────────────── */
.scan-result-card {
  background: linear-gradient(160deg, #FFFFFF 0%, #FFF8F5 100%);
  border: 1.5px solid #F2DEC4;
  border-radius: 18px;
  padding: 1.1rem 1rem;
  box-shadow: 0 4px 20px rgba(194, 125, 107, 0.12);
  overflow: hidden;
  position: relative;
}

.scan-result-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(194, 125, 107, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Header row */
.src-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #F2DEC4;
  padding-bottom: 0.55rem;
  margin-bottom: 0.7rem;
}

.src-event-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 800;
  color: #B45309;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.src-vip-badge {
  font-size: 0.58rem;
  font-weight: 700;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1px solid #FCD34D;
  color: #92400E;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}

/* Koordinator badge */
.src-koor-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  color: #065F46;
  border: 1.5px solid #6EE7B7;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  margin-bottom: 0.45rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

/* Label keterangan badge */
.src-label-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
  border: 1.5px solid;
  margin-bottom: 0.45rem;
}

.src-label-badge.vip {
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  color: #9A3412;
  border-color: #FDBA74;
}
.src-label-badge.reseller {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  color: #1E40AF;
  border-color: #93C5FD;
}
.src-label-badge.panitia {
  background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
  color: #5B21B6;
  border-color: #C4B5FD;
}
.src-label-badge.default {
  background: var(--color-blush-soft);
  color: var(--color-rose-deep);
  border-color: var(--color-rose-soft);
}

/* Guest name */
.src-name {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-charcoal);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

/* Pax badge */
.src-pax-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: #9F1239;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-weight: 700;
  margin-top: 0.2rem;
  margin-bottom: 0.15rem;
}

/* Seating card */
.src-seat {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.07) 0%, rgba(190, 18, 60, 0.13) 100%);
  border: 1.5px solid rgba(251, 113, 133, 0.4);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  margin: 0.75rem 0 0.6rem 0;
  text-align: center;
}

.src-seat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #BE123C;
  margin-bottom: 0.15rem;
}

.src-seat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #9F1239;
  letter-spacing: -0.01em;
}

/* Metadata grid */
.src-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.src-meta-cell {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  text-align: center;
}

.src-meta-cell-label {
  font-size: 0.53rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}

.src-meta-cell-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.src-meta-cell-value.monospace {
  font-family: monospace;
  color: var(--color-rose-deep);
}

/* ── Close Button Styles ────────────────────────────────── */
#modalBtnClose {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 14px;
  padding: 0.8rem 1rem;
}

.modal-card.success   #modalBtnClose {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  border-color: #16A34A;
  color: #fff;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}
.modal-card.duplicate #modalBtnClose {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border-color: #DC2626;
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.modal-card.wrong_session #modalBtnClose,
.modal-card.warning   #modalBtnClose {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-color: #D97706;
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.modal-card.error #modalBtnClose {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border-color: #DC2626;
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* ── Log Item upgrade ───────────────────────────────────── */
.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #FAFAF8;
  border-left: 4px solid #A7F3D0;
  font-size: 0.83rem;
  transition: all 0.15s ease;
  gap: 0.5rem;
}

.log-item.koor {
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border-left-color: #34D399;
}

.log-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 10px rgba(133, 66, 55, 0.08);
}

/* ── Tab Switcher: Kamera vs Daftar Tamu ────────────────────── */
.scanner-tab-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 0.3rem;
  gap: 0.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(133, 66, 55, 0.05);
}

.scanner-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.scanner-tab-btn i {
  font-size: 1.15rem;
  transition: transform 0.2s;
}

.scanner-tab-btn:hover {
  color: var(--color-charcoal);
  background: rgba(194, 125, 107, 0.08);
}

.scanner-tab-btn.active {
  background: var(--gradient-rose);
  color: #FFFDF9;
  box-shadow: 0 4px 12px rgba(133, 66, 55, 0.28);
}

.scanner-tab-btn.active i {
  transform: scale(1.1);
}

.badge-tab-count {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
}

.scanner-tab-btn:not(.active) .badge-tab-count {
  background: var(--color-blush-soft);
  color: var(--color-rose-deep);
}

/* ── Guest Directory Card ────────────────────────────────────── */
.scanner-directory-card {
  background: #FFFDF9;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  padding: 1.1rem;
  box-shadow: 0 8px 24px rgba(133, 66, 55, 0.06);
  margin-bottom: 1.25rem;
}

.directory-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.directory-title-group h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-charcoal);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.directory-title-group p {
  font-size: 0.73rem;
  color: var(--color-muted);
  margin: 0.15rem 0 0 0;
}

.directory-search-wrapper {
  position: relative;
  margin-bottom: 0.75rem;
}

.directory-search-input {
  width: 100%;
  padding: 0.72rem 2.2rem 0.72rem 2.5rem;
  border-radius: 14px;
  border: 1.5px solid var(--color-border);
  background: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--color-charcoal);
  transition: all 0.2s;
  box-sizing: border-box;
}

.directory-search-input:focus {
  outline: none;
  border-color: var(--color-rose-gold);
  box-shadow: 0 0 0 3px rgba(194, 125, 107, 0.18);
}

.directory-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.directory-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem;
  display: none;
}

/* ── Filter Pills (Hidden: Digantikan oleh Live Stats Bar di atas) ── */
.directory-filter-row {
  display: none !important;
}

.directory-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border-radius: 99px;
  border: 1.5px solid var(--color-border);
  background: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--color-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.directory-filter-pill:hover {
  border-color: var(--color-rose-soft);
  color: var(--color-charcoal);
}

.directory-filter-pill.active {
  background: var(--color-charcoal);
  color: #FFFDF9;
  border-color: var(--color-charcoal);
}

.directory-filter-pill.active.pill-hadir {
  background: #15803D;
  border-color: #15803D;
}

.directory-filter-pill.active.pill-belum {
  background: #B45309;
  border-color: #B45309;
}

.directory-filter-count {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
}

.directory-filter-pill.active .directory-filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFDF9;
}

/* ── Guest List Directory Items ─────────────────────────────── */
.directory-guest-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.directory-guest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--color-border);
  gap: 0.65rem;
  transition: all 0.18s ease;
}

.directory-guest-item:hover {
  transform: translateY(-1px);
  border-color: var(--color-rose-soft);
  box-shadow: 0 4px 12px rgba(133, 66, 55, 0.07);
}

.directory-guest-item.status-hadir {
  border-left: 4px solid #16A34A;
  background: #FBFDFB;
}

.directory-guest-item.status-belum {
  border-left: 4px solid #F59E0B;
}

.guest-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
  background: var(--color-blush-soft);
  color: var(--color-rose-deep);
  border: 1.5px solid var(--color-rose-soft);
}

.directory-guest-item.status-hadir .guest-item-avatar {
  background: #DCFCE7;
  color: #15803D;
  border-color: #86EFAC;
}

.guest-item-info {
  flex: 1;
  min-width: 0;
}

.guest-item-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.18rem;
}

.guest-item-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-charcoal);
  line-height: 1.3;
}

.guest-item-nida {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.38rem;
  border-radius: 5px;
  background: var(--color-blush-soft);
  color: var(--color-rose-deep);
}

.guest-item-meta {
  font-size: 0.72rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.guest-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.badge-hadir-live {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #15803D;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}

.badge-belum-live {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}

.btn-checkin-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.32rem 0.75rem;
  border-radius: 99px;
  border: none;
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.28);
}

.btn-checkin-action:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.38);
}

.checkin-detail-info {
  font-size: 0.62rem;
  color: var(--color-muted);
  text-align: right;
  line-height: 1.25;
}

/* ── Hero Action: Launch Scanner Button ─────────────────────── */
.scanner-hero-action {
  margin-bottom: 1.15rem;
}

.btn-hero-scanner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid rgba(194, 125, 107, 0.4);
  background: linear-gradient(135deg, #854237 0%, #C27D6B 60%, #D4907E 100%);
  color: #FFFDF9;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(133, 66, 55, 0.28);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.btn-hero-scanner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.btn-hero-scanner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(133, 66, 55, 0.38);
}

.btn-hero-scanner:active {
  transform: translateY(0);
}

.btn-hero-scanner-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #FFFDF9;
  flex-shrink: 0;
  position: relative;
}

.scanner-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.btn-hero-scanner-text {
  flex: 1;
  min-width: 0;
}

.btn-hero-scanner-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FFFDF9;
  line-height: 1.25;
}

.btn-hero-scanner-text small {
  display: block;
  font-size: 0.73rem;
  color: rgba(255, 253, 249, 0.85);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.btn-hero-scanner-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFDF9;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

/* ── Top Bar in Scanner Mode (with Back to Directory Button) ── */
.scanner-top-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-back-directory {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  background: #FFFDF9;
  border: 1.5px solid var(--color-border);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(133, 66, 55, 0.06);
}

.btn-back-directory:hover {
  background: var(--color-blush-soft);
  border-color: var(--color-rose-gold);
  color: var(--color-rose-deep);
}

.scanner-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803D;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Floating Action Button (FAB) ───────────────────────────── */
.scanner-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 1.25rem);
  right: 1.25rem;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: 99px;
  border: none;
  background: linear-gradient(135deg, #854237 0%, #C27D6B 100%);
  color: #FFFDF9;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(133, 66, 55, 0.45);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scanner-fab i {
  font-size: 1.3rem;
}

.scanner-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(133, 66, 55, 0.55);
}

.scanner-fab:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .scanner-fab {
    bottom: calc(var(--nav-height) + 0.85rem);
    right: 0.85rem;
    padding: 0.75rem 1.05rem;
    font-size: 0.82rem;
  }
}

/* ── Scanner Popup Modal ─────────────────────────────────────── */
.scanner-modal-backdrop {
  z-index: 9998;
}

.scanner-modal-card {
  max-width: 520px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #FFFDF9;
  border-radius: 28px 28px 0 0;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.35);
}

@media (min-width: 600px) {
  .scanner-modal-backdrop {
    align-items: center;
    padding: 1.5rem;
  }
  .scanner-modal-card {
    border-radius: 28px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }
}

.scanner-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: #FFFDF9;
  flex-shrink: 0;
}

.scanner-modal-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-rose);
  color: #FFFDF9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 12px rgba(133, 66, 55, 0.25);
  flex-shrink: 0;
}

.btn-close-scanner-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: #FFFFFF;
  color: var(--color-charcoal);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}

.btn-close-scanner-modal:hover {
  background: #FFEBEE;
  border-color: #EF9A9A;
  color: #C62828;
  transform: rotate(90deg);
}

.scanner-modal-body {
  padding: 1rem 1.2rem 1.5rem 1.2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

