/* ===================================
   VOLTO SEMPRE - SISTEMA DE FIDELIDADE
   Versão HTML/CSS/JS - Dark Mode Support
   =================================== */

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

/* CSS Variables - Light Mode (Default) */
:root {
  /* Brand Colors */
  --primary: #01408F;
  --secondary: #c2c62a;
  --accent-yellow: #c2c62a;
  
  /* Light Mode Surfaces */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  
  /* Light Mode Text */
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  
  /* Borders */
  --border-light: #E5E7EB;
  --border-medium: #D1D5DB;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary: #0A5AC4;
  --secondary: #c2c62a;
  --accent-yellow: #d4d83c;
  
  /* Dark Mode Surfaces */
  --bg-primary: #1A1D24;
  --bg-secondary: #0F1115;
  --bg-tertiary: #25282F;
  
  /* Dark Mode Text */
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-tertiary: #9CA3AF;
  
  /* Dark Mode Borders */
  --border-light: #374151;
  --border-medium: #4B5563;
  
  /* Dark Mode Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Body */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Typography */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Mobile Container */
.mobile-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-secondary);
  position: relative;
  transition: background 0.3s ease;
}

/* Page Management */
.page {
  min-height: 100vh;  
}

.page.active {
  display: block;
}

.page-fullscreen {
  background: var(--primary);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  /*box-shadow: var(--shadow-sm);*/
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.app-header.with-back {
  justify-content: space-between;
  background-color:var(--bg-secondary);
}

.app-header h3 {
  color: var(--primary);
  flex: 1;
  text-align: center;
}

/* Logo */
.logo-small {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, #023a7a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
}

.logo-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, #023a7a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 2rem;
  box-shadow: var(--shadow-lg);
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;  
}

.btn-primary:hover {
  background: #023a7a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;  
}

.btn-secondary:hover {
  background: #b4b826;
  transform: translateY(-1px);
}

.btn-large {
  padding: 14px 24px;
  font-size: 1rem;
}

.btn-link {
  background: none;
  color: var(--primary);
  padding: 8px;
  font-size: 0.875rem;
  text-align: right; 
  margin-bottom: 16px;
}

.btn-back {
  background: transparent;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-back:hover {
  background: var(--bg-tertiary);
}

.btn-back svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.btn-close {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close svg {
  width: 24px;
  height: 24px;
  color: white;
}

.btn-edit {  
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

/* Main Content */
.main-content {
  padding: 0 0 80px 0;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background: var(--bg-primary);
}

.login-header {
  text-align: center;
  margin-bottom: 48px;
}

.login-subtitle {
  color: var(--text-secondary);
  margin-top: 8px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

    .form-group select {
        padding: 12px 16px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        font-size: 0.875rem;
        background: var(--bg-primary);
        color: var(--text-primary);
        transition: border-color 0.2s;
    }

        .form-group select:focus {
            outline: none;
            border-color: var(--primary);
        }

    .form-group textarea {
        padding: 12px 16px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        font-size: 0.875rem;
        background: var(--bg-primary);
        color: var(--text-primary);
        transition: border-color 0.2s;
    }

        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
        }

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.divider span {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Welcome Section */
.welcome-section {
  padding: 10px 16px;
}

.welcome-section h2 {
  margin-bottom: 4px;
}

.welcome-section p {
  color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 24px;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-content {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Section Header */
.section-header {
  padding: 16px 16px 12px;
}

.section-header h3 {
  color: var(--primary);
}

/* Campaigns List */
.campaigns-list {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Campaign Card */
.campaign-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInUp 0.4s ease-out;
  margin-bottom:20px;
}

.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.campaign-header {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.campaign-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.campaign-image svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.campaign-info {
  flex: 1;
}

.campaign-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
}

.badge-active {
  background: #DEF7EC;
  color: #03543F;
}

.badge-paused {
  background: #FEF3C7;
  color: #92400E;
}

.campaign-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.campaign-description {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

/* Progress Bar */
.progress-section {
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.progress-value {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Stamps Grid */
.stamps-section {
  padding-top: 16px;
  
}

.stamps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.stamp {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-tertiary);
  transition: all 0.2s ease;
}

.stamp.filled {
  background: var(--secondary);
  box-shadow: var(--shadow-sm);
}

/* Reward Footer */
.reward-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;  
}

.reward-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reward-info svg {
  width: 20px;
  height: 20px;
  color: var(--secondary);
}

.reward-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reward-points {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Rewards List */
.rewards-list {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reward-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--secondary);
  display: flex;
  gap: 16px;
  transition: all 0.3s ease;
}

.reward-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reward-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.reward-content {
  flex: 1;
}

.reward-header-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}

.reward-title h4 {
  margin-bottom: 4px;
}

.reward-store {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.reward-expiry {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.reward-expiry svg {
  width: 16px;
  height: 16px;
  color: var(--secondary);
}

.reward-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.reward-status {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.btn-redeem {
  background: var(--secondary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* Profile */
.profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, #023a7a 100%);
  padding: 32px 16px;
  text-align: center;
  color: white;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.profile-avatar svg {
  width: 40px;
  height: 40px;
}

.profile-header h2 {
  color: white;
  margin-bottom: 4px;
}

.profile-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.section-container {
  padding: 24px 16px;
}

.section-container h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.info-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.info-icon svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.info-icon span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.info-item p {
  font-size: 0.875rem;
  color: var(--text-primary);
  padding-left: 24px;
}

/* Settings */
.settings-card {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.2s ease;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item:hover {
  background: var(--bg-tertiary);
}

.setting-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-left svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.setting-left span {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.chevron {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
}

/* Theme Toggle */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 24px;
  background: var(--border-medium);
  border-radius: 999px;
  transition: background 0.3s ease;
}

[data-theme="dark"] .toggle-switch {
  background: var(--secondary);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: left 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-thumb {
  left: 26px;
}

/* QR Scanner */
.scanner-container {
  min-height: 100vh;
  background: var(--primary);
  display: flex;
  flex-direction: column;
}

.scanner-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.scanner-header h3 {
  color: white;
  flex: 1;
  text-align: center;
}

.scanner-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.scanner-frame {
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, rgba(1, 64, 143, 0.3) 0%, rgba(194, 198, 42, 0.3) 100%);
  border-radius: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  animation: scan 2s ease-in-out infinite;
}

.scanner-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 4px solid var(--secondary);
}

.corner-tl {
  top: 16px;
  left: 16px;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}

.corner-tr {
  top: 16px;
  right: 16px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 8px 0 0;
}

.corner-bl {
  bottom: 16px;
  left: 16px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 8px;
}

.corner-br {
  bottom: 16px;
  right: 16px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

.scanner-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-icon svg {
  width: 40px;
  height: 40px;
  color: var(--secondary);
}

.scanner-instructions {
  padding: 32px 24px;
  text-align: center;
  color: white;
}

.scanner-instructions p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.bottom-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 480px;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bottom-nav > div {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  opacity: 0.6;
  transition: all 0.2s ease;
}

.nav-item:hover {
  opacity: 1;
}

.nav-item.active {
  color: var(--primary);
  opacity: 1;
  transform: scale(1.05);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item span {
  font-size: 0.75rem;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 96px;
  right: 16px;
  width: 64px;
  height: 64px;
  background: var(--secondary);
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(194, 198, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(194, 198, 42, 0.5);
}

.fab svg {
  width: 32px;
  height: 32px;
  color: white;
  position: relative;
  z-index: 2;
}

.fab-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--secondary);
  border-radius: 50%;
  opacity: 0.4;
  animation: pulse 2s infinite;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

@keyframes scan {
  0%, 100% {
    top: 0;
  }
  50% {
    top: calc(100% - 3px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Loading Screen */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-tertiary);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  height: 200px;
  margin-bottom: 16px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: calc(100% - 32px);
}

.toast {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: start;
  gap: 12px;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--secondary);
}

.toast.toast-success {
  border-left-color: #10B981;
}

.toast.toast-error {
  border-left-color: #EF4444;
}

.toast.toast-warning {
  border-left-color: #F59E0B;
}

.toast.toast-info {
  border-left-color: var(--primary);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-icon.success {
  color: #10B981;
}

.toast-icon.error {
  color: #EF4444;
}

.toast-icon.warning {
  color: #F59E0B;
}

.toast-icon.info {
  color: var(--primary);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* Ripple Effect */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* Pull to Refresh */
.pull-to-refresh {
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: top 0.3s ease;
}

.pull-to-refresh.active {
  top: 0;
}

.pull-to-refresh svg {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

/* Empty State */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.empty-state-icon svg {
  width: 40px;
  height: 40px;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-message {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Enhanced Button States */
button {
  position: relative;
  overflow: hidden;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Button Loading State */
button.loading {
  pointer-events: none;
  opacity: 0.6;
}

button.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Smooth Page Transitions */
.page-enter {
  animation: slideInRight 0.3s ease-out;
}

.page-exit {
  animation: slideOut 0.3s ease-out;
}

/* Card Hover Effects */
.campaign-card,
.reward-card {
  position: relative;
  overflow: hidden;
}

.campaign-card::before,
.reward-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(194, 198, 42, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.campaign-card:hover::before,
.reward-card:hover::before {
  left: 100%;
}

.campaign-card:active {
  transform: translateY(-2px) scale(0.99);
}

/* Card Shadow Enhancement on Dark Mode */
[data-theme="dark"] .campaign-card,
[data-theme="dark"] .reward-card,
[data-theme="dark"] .stat-card {
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .campaign-card:hover,
[data-theme="dark"] .reward-card:hover {
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Progress Bar Animation */
.progress-fill {
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Stamp Animation */
.stamp {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.stamp:hover {
  transform: scale(1.1) rotate(5deg);
}

.stamp.filled {
  animation: stampAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.stamp.filled::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: bold;
  opacity: 0;
  animation: checkAppear 0.3s ease-out 0.3s forwards;
}

@keyframes stampAppear {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes checkAppear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* FAB Animation Enhancement */
.fab {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab:active {
  transform: scale(0.9);
}

/* Input Focus Effects */
.form-group input:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(1, 64, 143, 0.15);
}

/* Bottom Nav Animation */
.bottom-nav {
  animation: slideUp 0.3s ease-out;
}

/* Stat Card Animation */
.stat-card {
  animation: fadeInUp 0.4s ease-out backwards;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Modal/Dialog Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  max-width: 90%;
  width: 400px;
  animation: slideInRight 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-footer button {
  min-width: 100px;
}

/* Stagger Animation for Lists */
.campaigns-list > *,
.rewards-list > * {
  animation: fadeInUp 0.4s ease-out backwards;
}

.campaigns-list > *:nth-child(1),
.rewards-list > *:nth-child(1) {
  animation-delay: 0.05s;
}

.campaigns-list > *:nth-child(2),
.rewards-list > *:nth-child(2) {
  animation-delay: 0.1s;
}

.campaigns-list > *:nth-child(3),
.rewards-list > *:nth-child(3) {
  animation-delay: 0.15s;
}

.campaigns-list > *:nth-child(4),
.rewards-list > *:nth-child(4) {
  animation-delay: 0.2s;
}

/* Responsive adjustments for larger screens */
@media (min-width: 481px) {
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
  
  .fab {
    right: calc(50% - 240px + 16px);
  }
  
  .toast-container {
    right: calc(50% - 240px + 16px);
  }
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--secondary);
  top: -10px;
  z-index: 10000;
  animation: confettiFall 3s ease-out forwards;
  pointer-events: none;
}

.confetti:nth-child(odd) {
  background: var(--primary);
}

.confetti:nth-child(3n) {
  background: var(--secondary);
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Success Celebration */
@keyframes celebrate {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.2) rotate(-5deg);
  }
  75% {
    transform: scale(1.2) rotate(5deg);
  }
}

.celebrate {
  animation: celebrate 0.5s ease-in-out;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .confetti {
    display: none;
  }
}

/* Detail Pages */
.detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #023a7a 100%);
  padding: 24px 16px;
  color: white;
}

.detail-hero h2 {
  color: white;
  margin-bottom: 8px;
}

.detail-hero p {
  color: rgba(255, 255, 255, 0.9);
}

.detail-content {
  padding: 16px;
}

.detail-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.detail-card h4 {
  color: var(--primary);
  margin-bottom: 12px;
}

.store-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-info-item {
  display: flex;
  align-items: start;
  gap: 12px;
}

.store-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.store-info-item div p:first-child {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.qr-scanner {
    background-color: var(--primary);
}