:root {
  --bg-main: #111111;
  --bg-card: #1f1f22;
  --bg-glass: rgba(31, 31, 34, 0.7);
  --primary: #00ff7f;
  --primary-hover: #00cc66;
  --text-main: #ffffff;
  --text-muted: #a0a0a5;
  --danger: #ff4757;
  --border: #333333;
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

#app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.loader-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--bg-card);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Glassmorphism Classes */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Utility classes */
.btn-primary {
  background-color: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  font-size: 16px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

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

.form-control {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 16px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
}

/* Glass Input Controls & Autofill Overrides */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #161e19 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
  opacity: 1;
}

.glass-input {
  background: rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

.glass-input:focus {
  border-color: var(--primary) !important;
  background: rgba(255, 255, 255, 0.11) !important;
}

/* ============================================================
   FAB - Botón Flotante Pase de Ingreso QR
   ============================================================ */
.qr-fab {
  position: fixed;
  bottom: 92px; /* encima de la navbar */
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 255, 127, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fab-pulse 2.5s ease-in-out infinite;
}

.qr-fab:hover, .qr-fab:active {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 255, 127, 0.75);
  animation: none;
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 255, 127, 0.5); }
  50%       { box-shadow: 0 4px 35px rgba(0, 255, 127, 0.85); }
}

/* ============================================================
   Modal de Pase QR a Pantalla Completa
   ============================================================ */
.qr-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
}

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

.qr-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s;
}

.qr-modal-close:hover {
  background: rgba(255,255,255,0.16);
}

.qr-canvas-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  margin: 20px 0;
  box-shadow: 0 0 40px rgba(0, 255, 127, 0.25);
}

.qr-timer-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: 10px auto 0;
}

.qr-timer-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 1s linear;
}

.qr-expires-txt {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
}

.qr-expires-txt span {
  color: var(--primary);
  font-weight: 700;
}

/* Button Loading & Micro-Spinner States */
.btn-loading {
  position: relative;
  pointer-events: none !important;
  opacity: 0.8 !important;
  cursor: not-allowed !important;
}

.micro-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}

