/* ============================================================
   SISTEM CATITAN KEDATANGAN QRCODE — Global Stylesheet v1.0
   ============================================================
   Fail ini menggantikan SEMUA CSS inline/embedded dari:
   - index.php
   - qrcode.php
   - nfc.php
   - mobile.php
   ============================================================ */

/* ===== 1. RESET & VARIABLES ===== */
:root {
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --purple-500: #8b5cf6;
  --purple-600: #6366f1;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #065f46;
  --green-100: #a7f3d0;
  --green-50: #f0fdf4;
  --yellow-500: #f59e0b;
  --yellow-600: #d97706;
  --yellow-700: #92400e;
  --yellow-100: #fde68a;
  --yellow-50: #fffbeb;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #991b1b;
  --red-100: #fca5a5;
  --red-50: #fef2f2;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --white: #ffffff;
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, .06);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, .1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .15);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition: all .3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

input, textarea, button, select, a, div {
  -webkit-tap-highlight-color: transparent;
}

/* ===== 2. BACKGROUND GRADIENTS ===== */
body.bg-blue {
  background: linear-gradient(135deg, #f0f4ff 0%, #dbeafe 100%);
}
body.bg-green {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

/* ===== 3. CONTAINER ===== */
.container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  padding: 35px 30px;
  position: relative;
  overflow: hidden;
}
.container-sm {
  max-width: 420px;
  padding: 25px 20px;
}
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}
.container-sm::before {
  height: 4px;
}
.container.blue-bar::before {
  background: linear-gradient(90deg, var(--blue-500), var(--purple-500), var(--blue-500));
}
.container.green-bar::before {
  background: linear-gradient(90deg, var(--green-500), #06b6d4, var(--green-500));
}
.container.purple-bar::before {
  background: linear-gradient(90deg, var(--blue-500), var(--purple-600), var(--blue-500));
}

/* ===== 4. BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 20px;
  transition: color .2s;
}
.back-link:hover {
  color: var(--blue-500);
}
.back-link-sm {
  font-size: 12px;
  margin-bottom: 12px;
}

/* ===== 5. HEADER ===== */
.header {
  text-align: center;
  margin-bottom: 24px;
}
.header-sm {
  margin-bottom: 16px;
}
.header .icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  color: var(--white);
}
.header-sm .icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 22px;
  margin-bottom: 10px;
}
.header .icon.blue {
  background: linear-gradient(135deg, var(--blue-500), var(--purple-600));
}
.header .icon.green {
  background: linear-gradient(135deg, var(--green-500), #06b6d4);
}
.header h2 {
  color: var(--gray-800);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 4px;
}
.header-sm h2 {
  font-size: 18px;
  margin-bottom: 2px;
}
.header p {
  color: var(--gray-500);
  font-size: 13px;
}
.header-sm p {
  font-size: 11px;
}
.header .date {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  background: var(--gray-100);
  border-radius: 20px;
  font-size: 13px;
  color: var(--gray-600);
}

/* ===== 6. MENU BUTTONS ===== */
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.menu-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 3px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.menu-btn:hover {
  transform: translateY(-4px);
}
.menu-btn .btn-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: var(--transition);
}
.menu-btn .btn-text {
  flex: 1;
}
.menu-btn .btn-text .btn-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}
.menu-btn .btn-text .btn-desc {
  font-size: 12px;
  color: var(--gray-500);
}
.menu-btn .btn-arrow {
  color: var(--gray-400);
  font-size: 18px;
  transition: var(--transition);
}
.menu-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* QR Button */
.menu-btn.qr {
  border-color: var(--blue-100);
}
.menu-btn.qr:hover {
  border-color: var(--blue-500);
  box-shadow: 0 12px 30px rgba(59, 130, 246, .25);
  background: var(--blue-50);
}
.menu-btn.qr .btn-icon {
  background: var(--blue-50);
  color: var(--blue-500);
}
.menu-btn.qr .btn-title {
  color: var(--blue-700);
}

/* NFC Button */
.menu-btn.nfc {
  border-color: var(--green-100);
}
.menu-btn.nfc:hover {
  border-color: var(--green-500);
  box-shadow: 0 12px 30px rgba(16, 185, 129, .25);
  background: var(--green-50);
}
.menu-btn.nfc .btn-icon {
  background: #ecfdf5;
  color: var(--green-500);
}
.menu-btn.nfc .btn-title {
  color: var(--green-700);
}

/* ===== 7. FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 14px;
}
.form-group label i {
  color: var(--blue-500);
  margin-right: 6px;
}
.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 16px;
  transition: var(--transition);
  outline: none;
  background: var(--gray-50);
  font-family: monospace;
  letter-spacing: 2px;
}
.form-group input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .1);
  background: var(--white);
}
.input-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* ===== 8. BUTTONS ===== */
.btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--purple-600));
  color: var(--white);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, .3);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none !important;
}
.btn-reset {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  background: var(--white);
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-reset:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}
.btn-success-reset {
  background: var(--green-50);
  border: 2px solid var(--green-100);
  color: var(--green-700);
  font-weight: 700;
}

/* ===== 9. MESSAGES ===== */
.message {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.message-error {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}
.message-info {
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
}
.message-warning {
  background: var(--yellow-50);
  color: var(--yellow-700);
  border: 1px solid var(--yellow-100);
}
.message-success {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.message-center {
  justify-content: center;
}

/* ===== 10. CLIENT CARD ===== */
.client-card {
  background: #f0f9ff;
  border: 2px solid #bae6fd;
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
  animation: fadeIn .4s;
}
.client-card.green {
  background: var(--green-50);
  border-color: var(--green-100);
}
.client-card .name {
  font-size: 16px;
  font-weight: 700;
  color: #0c4a6e;
  margin-bottom: 6px;
}
.client-card.green .name {
  color: var(--green-700);
  font-size: 15px;
  margin-bottom: 4px;
}
.client-card .info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--gray-600);
}
.client-card .info span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.client-card .info i {
  color: #0284c7;
  width: 14px;
}
.client-card.green .info i {
  color: var(--green-600);
  width: 12px;
  font-size: 11px;
}

/* ===== 11. CHOICE BUTTONS (Hadir/Balik) ===== */
.choice-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
  animation: fadeIn .4s;
}
.choice-btn {
  padding: 22px 16px;
  border-radius: 16px;
  border: 3px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.choice-btn i {
  font-size: 32px;
}
.choice-btn:hover {
  transform: translateY(-3px);
}
.choice-btn.hadir {
  border-color: var(--green-100);
  color: var(--green-700);
  background: var(--green-50);
}
.choice-btn.hadir:hover,
.choice-btn.hadir.selected {
  background: var(--green-500);
  border-color: var(--green-600);
  color: var(--white);
  box-shadow: 0 8px 25px rgba(16, 185, 129, .3);
}
.choice-btn.balik {
  border-color: var(--yellow-100);
  color: var(--yellow-700);
  background: var(--yellow-50);
}
.choice-btn.balik:hover,
.choice-btn.balik.selected {
  background: var(--yellow-500);
  border-color: var(--yellow-600);
  color: var(--white);
  box-shadow: 0 8px 25px rgba(245, 158, 11, .3);
}
.disabled-btn,
.choice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(50%);
  transform: none !important;
  box-shadow: none !important;
  border-style: dashed !important;
}

/* ===== 12. SELECTION HINT ===== */
.selection-hint {
  text-align: center;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 10px;
}
.selection-hint.lengkap-hint,
.selection-hint.green {
  background: var(--green-50);
  color: var(--green-700);
  border-color: var(--green-100);
}
.selection-hint.red {
  background: var(--red-50);
  color: var(--red-700);
  border-color: var(--red-100);
}

/* ===== 13. STATUS NOTICES ===== */
.status-notice {
  padding: 14px 16px;
  border-radius: 10px;
  margin: 14px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  animation: fadeIn .4s;
  line-height: 1.5;
}
.status-notice i {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.status-notice .notice-text {
  flex: 1;
}
.status-notice .notice-text strong {
  font-weight: 700;
}
.status-notice-hadir {
  background: var(--yellow-50);
  color: var(--yellow-700);
  border: 1px solid var(--yellow-100);
}
.status-notice-hadir i {
  color: var(--yellow-500);
}
.status-notice-lengkap {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.status-notice-lengkap i {
  color: var(--green-500);
}

/* ===== 14. GPS STATUS ===== */
.gps-status {
  padding: 10px 14px;
  border-radius: 10px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  animation: fadeIn .4s;
}
.gps-waiting {
  background: var(--gray-50);
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
}
.gps-success {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.gps-failed {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}
.gps-warning {
  background: var(--yellow-50);
  color: var(--yellow-700);
  border: 2px solid var(--yellow-500);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 14px;
  line-height: 1.6;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.gps-warning .gps-warn-title {
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 4px;
}
.gps-warning .gps-warn-detail {
  font-size: 12px;
  font-weight: 400;
  color: var(--yellow-700);
}
.gps-success-in {
  background: var(--green-50);
  color: var(--green-700);
  border: 2px solid #22c55e;
}
.gps-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-400);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ===== 15. QR SECTION ===== */
.qr-section {
  margin-top: 20px;
  text-align: center;
  animation: fadeIn .5s;
}
.qr-card {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  padding: 25px 20px 20px;
}
.qr-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.qr-label i {
  color: var(--blue-500);
}
.qr-wrapper {
  display: inline-block;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.qr-wrapper canvas {
  display: block !important;
  margin: 0 auto;
}
.qr-wrapper img {
  display: none !important;
}
.qr-data-display {
  margin-top: 12px;
  padding: 10px;
  background: var(--gray-100);
  border-radius: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  color: var(--gray-600);
  word-break: break-all;
  letter-spacing: .5px;
  border: 1px dashed var(--gray-300);
}

/* ===== 16. COUNTDOWN BAR ===== */
.countdown-bar {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #c2410c;
  animation: pulse-warn 1s infinite;
}
.countdown-bar.urgent {
  background: var(--red-50);
  border-color: var(--red-100);
  color: var(--red-600);
  animation: pulse-urgent .5s infinite;
}
.countdown-bar.expired {
  background: var(--red-50);
  border-color: var(--red-500);
  color: var(--red-700);
  animation: none;
}
.countdown-bar.success-bar {
  background: var(--green-50);
  border-color: var(--green-100);
  color: var(--green-700);
  animation: none;
}

/* ===== 17. SCANNER NOTICE ===== */
.scanner-notice {
  background: var(--blue-50);
  border: 2px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
  text-align: center;
  font-size: 13px;
  color: var(--blue-700);
  animation: fadeIn .4s;
}
.scanner-notice i {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
  color: var(--blue-500);
}

/* ===== 18. TOKEN STATUS ===== */
.token-status {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  margin: 12px 0;
  font-size: 13px;
  font-weight: 600;
  animation: fadeIn .4s;
}
.token-waiting {
  background: var(--blue-50);
  color: var(--blue-700);
  border: 2px solid var(--blue-100);
}
.token-verified {
  background: var(--green-50);
  color: var(--green-700);
  border: 2px solid var(--green-100);
}
.token-expired {
  background: var(--red-50);
  color: var(--red-700);
  border: 2px solid var(--red-100);
}

/* ===== 19. OVERLAY ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s;
}
.overlay-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
}
.overlay-card .warn-icon {
  font-size: 48px;
  color: var(--yellow-500);
  margin-bottom: 12px;
}
.overlay-card h4 {
  color: var(--gray-800);
  margin-bottom: 8px;
  font-size: 18px;
}
.overlay-card p {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.overlay-card .overlay-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.overlay-card .overlay-btns button {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.overlay-card .btn-yes {
  background: linear-gradient(135deg, var(--blue-500), var(--purple-600));
  color: var(--white);
}
.overlay-card .btn-yes:hover {
  box-shadow: 0 8px 20px rgba(59, 130, 246, .3);
}
.overlay-card .btn-cancel {
  background: var(--gray-100);
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
}
.overlay-card .btn-cancel:hover {
  background: var(--gray-200);
}
.overlay-card .btn-full {
  width: 100%;
}

/* ===== 20. SCANNER CARD (NFC) ===== */
.scanner-card {
  background: var(--gray-50);
  border: 3px dashed var(--gray-300);
  border-radius: 14px;
  padding: 20px 15px;
  text-align: center;
  margin: 10px 0;
  transition: all .4s ease;
  position: relative;
}
.scanner-card-lg {
  border-radius: 16px;
  padding: 30px 20px;
  margin: 16px 0;
}
.scanner-card.active-scan {
  border-color: var(--green-500);
  border-style: solid;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, .06);
  background: var(--green-50);
}
.scanner-card.scan-success {
  border-color: var(--green-500);
  border-style: solid;
  background: var(--green-50);
}
.scanner-card.scan-error {
  border-color: var(--red-500);
  border-style: solid;
  background: var(--red-50);
}
.scanner-icon {
  font-size: 42px;
  color: var(--green-500);
  margin-bottom: 10px;
  animation: pulseNfc 2s ease-in-out infinite;
}
.scanner-card.scan-success .scanner-icon {
  color: var(--green-500);
  animation: none;
  opacity: 1;
}
.scanner-card.scan-error .scanner-icon {
  color: var(--red-500);
  animation: none;
  opacity: 1;
}
.scanner-icon-lg {
  font-size: 56px;
  margin-bottom: 16px;
}
.scanner-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.scanner-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.scanner-subtitle-md {
  font-size: 13px;
  margin-bottom: 16px;
}

/* ===== 21. SCAN STATUS BAR ===== */
.scan-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin: 8px 0;
  transition: all .3s ease;
}
.scan-status-bar-md {
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  margin: 12px 0;
}
.scan-status-bar.ready {
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
}
.scan-status-bar.success-bar {
  background: #d1fae5;
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.scan-status-bar.error-bar {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}

/* ===== 22. HIDDEN NFC INPUT ===== */
.hidden-input-wrapper {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.hidden-input {
  width: 1px;
  height: 1px;
  border: none;
  outline: none;
  background: transparent;
  color: transparent;
  font-size: 1px;
}
.hidden-input:focus {
  outline: none;
  box-shadow: none;
}

/* ===== 23. REDIRECT NOTICE ===== */
.redirect-notice {
  text-align: center;
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid var(--yellow-100);
  border-radius: 10px;
  font-size: 14px;
  color: var(--yellow-700);
  font-weight: 600;
}
.redirect-notice i {
  color: var(--yellow-500);
  margin-right: 6px;
}

/* ===== 24. FLOW STEPS ===== */
.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 11px;
  color: var(--gray-500);
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}
.flow-step i {
  color: var(--green-500);
}
.flow-arrow {
  color: var(--gray-400);
}

/* ===== 25. AUTO DETECT BANNER ===== */
.auto-detect-banner {
  background: var(--blue-50);
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--blue-700);
  margin: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.4;
}

/* ===== 26. SCAN COUNT BADGE ===== */
.scan-count {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.scan-count-green {
  background: #ecfdf5;
  color: var(--green-700);
}

/* ===== 27. MOBILE BLOCKED ALERT ===== */
.mobile-blocked-alert {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  animation: fadeIn .4s;
}
.mobile-blocked-alert i {
  font-size: 20px;
}

/* ===== 28. FOOTER ===== */
.footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}
.footer i {
  color: var(--blue-500);
}

/* ===== 29. ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInFast {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-warn {
  0%, 100% { opacity: 1; }
  50% { opacity: .85; }
}
@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
@keyframes pulseNfc {
  0%, 100% { opacity: .4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 30. RESPONSIVE ===== */
@media (max-width: 480px) {
  .container {
    padding: 25px 18px;
  }
  .container-sm {
    padding: 18px 14px;
  }
  .header h2 {
    font-size: 18px;
  }
  .menu-btn {
    padding: 18px 16px;
    gap: 12px;
  }
  .menu-btn .btn-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  .menu-btn .btn-text .btn-title {
    font-size: 15px;
  }
  .choice-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .choice-btn {
    padding: 14px;
    font-size: 14px;
  }
  .choice-btn i {
    font-size: 28px;
  }
  .choice-btn small {
    font-size: 10px;
  }
  .scanner-card-lg {
    padding: 20px 14px;
  }
  .scanner-icon-lg {
    font-size: 42px;
  }
}

/* ===== 31. TOAST NOTIFICATION SYSTEM ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: calc(100% - 40px);
}
.toast {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideInRight .4s ease, fadeOut .3s ease 4.7s forwards;
  cursor: pointer;
}
.toast-success {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.toast-error {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}
.toast-warning {
  background: var(--yellow-50);
  color: var(--yellow-700);
  border: 1px solid var(--yellow-100);
}
.toast-info {
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== 32. LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}
.skeleton-text.short {
  width: 60%;
}
.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.skeleton-card {
  height: 80px;
  border-radius: var(--radius);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 33. DARK MODE ===== */
[data-theme="dark"] {
  --white: #1e293b;
  --gray-50: #1e293b;
  --gray-100: #334155;
  --gray-200: #475569;
  --gray-300: #64748b;
  --gray-400: #94a3b8;
  --gray-500: #cbd5e1;
  --gray-600: #e2e8f0;
  --gray-700: #f1f5f9;
  --gray-800: #f8fafc;
  --blue-50: #1e3a5f;
  --blue-100: #1e4a7a;
  --green-50: #0f2a1e;
  --green-100: #1a3d2e;
  --red-50: #2e1515;
  --red-100: #4a1e1e;
  --yellow-50: #2e2010;
  --yellow-100: #4a3518;
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, .3);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, .4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
}
[data-theme="dark"] body {
  background: #0f172a !important;
}
[data-theme="dark"] body.bg-blue,
[data-theme="dark"] body.bg-green {
  background: #0f172a !important;
}
[data-theme="dark"] .container {
  background: #1e293b;
}
[data-theme="dark"] input,
[data-theme="dark"] .form-group input {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}
[data-theme="dark"] .menu-btn,
[data-theme="dark"] .choice-btn {
  background: #1e293b;
}
[data-theme="dark"] .qr-wrapper {
  background: #334155;
}

/* ===== 34. DARK MODE TOGGLE BUTTON ===== */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gray-800);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.dark-mode-toggle:hover {
  transform: scale(1.1);
}
[data-theme="dark"] .dark-mode-toggle {
  background: var(--yellow-500);
  color: #1e293b;
}

/* ===== 35. ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* ===== 36. PROGRESS STEPPER ===== */
.progress-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 16px 0;
  padding: 8px;
  background: var(--gray-50);
  border-radius: var(--radius);
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  transition: var(--transition);
  color: var(--gray-400);
  position: relative;
}
.progress-step i {
  font-size: 14px;
}
.progress-step.active {
  background: var(--blue-50);
  color: var(--blue-700);
  box-shadow: 0 2px 8px rgba(59,130,246,.15);
}
.progress-step.done {
  color: var(--green-600);
}
.progress-step .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--gray-200);
  color: var(--gray-500);
}
.progress-step.active .step-num {
  background: var(--blue-500);
  color: var(--white);
}
.progress-step.done .step-num {
  background: var(--green-500);
  color: var(--white);
}
.progress-connector {
  width: 24px;
  height: 2px;
  background: var(--gray-300);
  border-radius: 1px;
  flex-shrink: 0;
}
.progress-connector.done {
  background: var(--green-500);
}

/* ===== 37. OFFLINE BANNER ===== */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid var(--yellow-500);
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.offline-banner.show {
  transform: translateY(0);
}
.offline-banner i {
  color: var(--yellow-500);
}

/* ===== 38. SUCCESS CHECKMARK ANIMATION ===== */
@keyframes checkmarkPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}
.checkmark-anim {
  animation: checkmarkPop .5s ease;
}

/* ===== 39. ERROR SHAKE ANIMATION ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.shake-anim {
  animation: shake .5s ease;
}

/* ===== 40. RIPPLE EFFECT ===== */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .4s;
}
.ripple:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* ===== 41. SKELETON LOADER (Enhanced) ===== */
.skeleton-qr {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  margin: 0 auto;
}

/* ===== 42. RESPONSIVE TABLET (768px) ===== */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
  .container {
    max-width: 100%;
    border-radius: 16px;
  }
  .progress-stepper {
    flex-wrap: wrap;
    gap: 4px;
  }
  .progress-step {
    padding: 6px 10px;
    font-size: 11px;
  }
  .progress-connector {
    display: none;
  }
}

/* ===== 43. RESPONSIVE SMALL MOBILE (320px) ===== */
@media (max-width: 380px) {
  .container {
    padding: 18px 12px;
  }
  .header h2 {
    font-size: 16px;
  }
  .menu-btn {
    padding: 14px 12px;
    gap: 10px;
  }
  .menu-btn .btn-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .menu-btn .btn-text .btn-title {
    font-size: 14px;
  }
  .choice-btn {
    padding: 12px 10px;
  }
  .choice-btn i {
    font-size: 24px;
  }
}
/* ===== 36. PRINT STYLES ===== */
@media print {
  .dark-mode-toggle,
  .toast-container,
  .overlay,
  .hidden-input-wrapper { display: none !important; }
  body { background: white !important; }
  .container { box-shadow: none; border: 1px solid #ccc; }
}