/* ==========================================
   WaveCard - Custom Styles
   Beyond Tailwind - Animations & Effects
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ---- Base ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0a0e1a;
  color: #e2e8f0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* ---- Animated Gradient Background ---- */
.hero-gradient {
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1530 25%, #0a1628 50%, #0d0f20 75%, #0a0e1a 100%);
  position: relative;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* ---- Glass Card ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(6, 182, 212, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.08);
}

/* ---- Glow Button ---- */
.btn-glow {
  position: relative;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  padding: 0.875rem 2.25rem;
  border-radius: 1rem;
  font-weight: 600;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-glow:hover::before {
  left: 100%;
}

.btn-glow:hover {
  box-shadow: 0 8px 40px rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

/* ---- WhatsApp Button ---- */
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  padding: 0.875rem 2.25rem;
  border-radius: 1rem;
  font-weight: 600;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-whatsapp:hover {
  box-shadow: 0 8px 40px rgba(37, 211, 102, 0.4);
  transform: translateY(-2px);
}

/* ---- Floating Orbs ---- */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: floatOrb 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ---- NFC Wave Animation ---- */
.nfc-wave {
  position: relative;
  display: inline-block;
}

.nfc-wave::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: waveExpand 2s ease-out infinite;
}

@keyframes waveExpand {
  0% { width: 100%; height: 100%; opacity: 1; }
  100% { width: 200%; height: 200%; opacity: 0; }
}

/* ---- Fade In Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Slide In ---- */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- Pulse Glow ---- */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.1); }
  50% { box-shadow: 0 0 40px rgba(6, 182, 212, 0.3); }
}

/* ---- Dashboard Sidebar ---- */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.sidebar-link:hover {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.1));
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ---- Input Styles ---- */
.input-dark {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #e2e8f0;
  font-size: 0.925rem;
  transition: all 0.3s ease;
  width: 100%;
  outline: none;
}

.input-dark:focus {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.input-dark::placeholder {
  color: #475569;
}

/* ---- Stats Card ---- */
.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(6, 182, 212, 0.2);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.5);
}

/* ---- Loader ---- */
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(6, 182, 212, 0.1);
  border-top-color: #06b6d4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---- Card Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ---- Profile Card (Public NFC Profile) ---- */
.profile-hero {
  background: linear-gradient(135deg, #0d1530, #0a1628, #0d0f20);
  min-height: 100vh;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(6, 182, 212, 0.4);
  object-fit: cover;
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.15);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Table Styles ---- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.data-table tr:hover td {
  background: rgba(6, 182, 212, 0.03);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-info { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
