:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --surface: #ffffff;
  --background: #fcfcfd;
  --border: #f1f1f4;
  --text-main: #18181b;
  --text-muted: #71717a;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.pay-btn {
  position: relative;
  padding: 12px 28px;
  font-size: 14px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.pay-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  background: #000;
}

.pay-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #e4e4e7;
  color: #a1a1aa;
}

.pay-btn:disabled .icon {
  color: #a1a1aa;
}

.icon-container {
  position: relative;
  width: 24px;
  height: 24px;
}

.icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  color: #22c55e;
  opacity: 0;
  visibility: hidden;
}

.default-icon {
  opacity: 1;
  visibility: visible;
}

/* Hover animations */
.pay-btn:hover:not(:disabled) .icon {
  animation: none;
}

.pay-btn:hover:not(:disabled) .wallet-icon {
  opacity: 0;
  visibility: hidden;
}

.pay-btn:hover:not(:disabled) .card-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 0s;
}

.pay-btn:hover:not(:disabled) .payment-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 0.5s;
}

.pay-btn:hover:not(:disabled) .dollar-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 1s;
}

.pay-btn:hover:not(:disabled) .check-icon {
  animation: iconRotate 2.5s infinite;
  animation-delay: 1.5s;
}

/* Processing state - show only checkmark or spinner */
.pay-btn.is-processing .icon {
  animation: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pay-btn.is-processing .check-icon {
  animation: checkmarkAppear 0.6s ease forwards;
  visibility: visible;
}

.btn-text {
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

@keyframes iconRotate {
  0% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.5);
  }
  5% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  15% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  20% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.5);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.5);
  }
}

@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.dashboard-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.premium-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
  border-radius: 24px;
}

.upload-slot {
  position: relative;
  background: #fafafa;
  border: 2px dashed #e4e4e7;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.upload-slot:hover {
  border-color: var(--brand);
  background: #f8fbff;
  transform: translateY(-2px);
}

.upload-slot.active {
  border-color: var(--brand);
  background: #fff;
  border-style: solid;
}

.action-button {
  background: var(--text-main);
  color: white;
  transition: all 0.2s ease;
}

.action-button:hover:not(:disabled) {
  background: #000;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.action-button:disabled {
  background: #e4e4e7;
  color: #a1a1aa;
  cursor: not-allowed;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-blue {
  background: var(--brand);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.notification-bar {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
}

.notification-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.scan-progress {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
  z-index: 20;
  animation: moveScan 2.5s infinite linear;
  display: none;
}

@keyframes moveScan {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

.processing .scan-progress {
  display: block;
}

/* Exchange Background Animation */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #f8fafc; /* Solid, clearer background */
}

.floating-card {
  position: absolute;
  width: 320px;
  height: 180px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
  border: 1px solid rgba(37, 99, 235, 0.05); /* Very subtle background cards */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.01);
  display: flex;
  flex-direction: column;
  padding: 24px;
  opacity: 0.15; /* Dramatically reduced background distraction */
  transition: all 0.5s ease;
}

/* Business Card Details */
.floating-card::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--brand) 0%, #60a5fa 100%);
  border-radius: 8px;
  opacity: 0.15;
}

.floating-card::after {
  content: "";
  width: 140px;
  height: 8px;
  background: var(--brand);
  opacity: 0.1;
  border-radius: 4px;
  box-shadow: 
    0 15px 0 0 rgba(0, 0, 0, 0.05),
    0 30px 0 0 rgba(0, 0, 0, 0.03),
    0 45px 0 0 rgba(0, 0, 0, 0.03),
    0 60px 0 0 rgba(0, 0, 0, 0.03);
}

.card-1 {
  top: 15%;
  left: -100px;
  transform: rotate(-15deg);
  animation: exchangeLeft 25s infinite ease-in-out;
}

.card-2 {
  bottom: 20%;
  right: -100px;
  transform: rotate(10deg);
  animation: exchangeRight 30s infinite ease-in-out;
  animation-delay: -5s;
}

.card-3 {
  top: 60%;
  left: 10%;
  width: 150px;
  height: 90px;
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

@keyframes exchangeLeft {
  0% {
    left: -320px;
    transform: rotate(-15deg) translateY(0);
  }
  45% {
    left: 45%;
    transform: rotate(-5deg) translateY(-20px);
  }
  55% {
    left: 55%;
    transform: rotate(5deg) translateY(20px);
  }
  100% {
    left: 110%;
    transform: rotate(15deg) translateY(0);
  }
}

@keyframes exchangeRight {
  0% {
    right: -320px;
    transform: rotate(10deg) translateY(0);
  }
  45% {
    right: 45%;
    transform: rotate(5deg) translateY(20px);
  }
  55% {
    right: 55%;
    transform: rotate(-5deg) translateY(-20px);
  }
  100% {
    right: 110%;
    transform: rotate(-10deg) translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-40px) rotate(10deg);
  }
}

.glow-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.07) 0%,
    transparent 75%
  );
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}

/* Leads Table Styling */
.leads-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 20px;
  background: white;
}

.leads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  text-align: left;
}

/* Table Header */
.leads-table th {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 16px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #334155;
  white-space: nowrap;
  height: 48px;
  vertical-align: middle;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Table Cells */
.leads-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 140px;
  max-width: 300px;
  vertical-align: middle;
}

/* Zebra Striping */
.leads-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.leads-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Specific Column Styles */
.leads-table td img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}
.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.web-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}
.web-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* Loader Animation */
.sync-loader {
  width: 48px;
  height: 48px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- EVENT MANAGEMENT EXTENSION --- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.event-modal {
  background: rgba(255, 255, 255, 0.95);
  width: 100%;
  max-width: 850px;
  max-height: calc(100vh - 40px);
  border-radius: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-backdrop.active .event-modal {
  transform: scale(1) translateY(0);
}

.event-modal::-webkit-scrollbar {
  width: 6px;
}
.event-modal::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.modal-header {
  padding: 32px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.modal-body {
  padding: 40px;
}

@media (max-width: 768px) {
  .modal-backdrop {
    padding: 12px;
    align-items: flex-start;
  }

  .event-modal {
    max-height: calc(100dvh - 24px);
    border-radius: 24px;
  }

  .modal-header {
    padding: 18px 20px;
  }

  .modal-body {
    padding: 20px;
  }
}

.section-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.section-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.05);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--background);
}

.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-left: 4px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 14px;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.input-field:focus {
  outline: none;
  border-color: var(--brand);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-pill {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.member-card {
  padding: 16px;
  background: var(--background);
  border-radius: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.remove-member {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #ef4444;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.remove-member:hover {
  opacity: 1;
}

.floating-mode-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: white;
  padding: 6px;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 4px;
  z-index: 1000;
  border: 1px solid var(--border);
}

.mode-btn {
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}

.mode-btn.active {
  background: var(--brand);
  color: white;
}

/* Switches */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e4e4e7;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--brand);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.success-overlay {
  position: absolute;
  inset: 0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.success-overlay.active {
  opacity: 1;
  visibility: visible;
}

.qr-placeholder {
  width: 200px;
  height: 200px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 20px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- EVENT GRID & CARD STYLES --- */
.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

#eventGridContainer {
  background: #f0f4f8; 
  border: 1px solid #e2e8f0;
  border-radius: 40px;
  padding: 60px 20px; /* Wider content area */
  margin-bottom: 40px;
  min-height: 500px;
  width: 100%;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

.event-card {
  background: #ffffff !important; /* Forces solid white background */
  border: 1px solid #cbd5e1;
  border-bottom: 6px solid #94a3b8; /* Strong 3D edge */
  border-radius: 32px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 120px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
  transition: all 0.2s ease-out;
  position: relative;
  overflow: visible;
}

.event-card:hover {
  transform: translateY(-8px);
  border-bottom-width: 10px;
  border-color: #3b82f6;
  border-bottom-color: #1e40af;
  box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.2);
}

.animate-slide-right {
  animation: slideRight 0.4s ease-out;
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Custom shadow for blue theme */
.shadow-blue-glow {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

#backToEventsBtn:hover {
  background: #f8fafc;
  border-color: var(--brand);
}

#backToEventsBtn:hover svg {
  color: var(--brand);
}

