/* ============================================================================
   Community Commerce Platform (CCP) - Premium Design System (Vanilla CSS)
   Aesthetics: Sleek Dark Mode, Glassmorphism, Outfit Typography, Micro-animations
   ============================================================================ */

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

:root {
  /* Dark Slate Primary Palette */
  --bg-primary: #0b0f19;      /* Deep midnight blue-slate */
  --bg-secondary: #131a2b;    /* Card backdrop base */
  --bg-glass: rgba(30, 41, 59, 0.45); /* Translucent slate */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-active: rgba(255, 255, 255, 0.18);
  
  /* Text Contrast Hierarchy */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Vibrant Semantic Accents (Lopburi emerald-farm & amber-sun) */
  --accent-emerald: #10b981;
  --accent-emerald-farm: #10b981;  /* Success, online states, active buttons */
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-amber-sun: #f59e0b;     /* Pending action, warning, delivering states */
  --accent-rose: #f43f5e;
  --accent-rose-danger: #f43f5e;    /* Negative actions, critical alerts, offline states */
  --accent-indigo: #6366f1;
  --accent-indigo-sky: #6366f1;     /* Primary branding, focus indicators */
  
  /* Glassmorphism Blur & Shadows */
  --glass-blur: blur(16px);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --shadow-emerald: 0 0 15px rgba(16, 185, 129, 0.2);
  --shadow-rose: 0 0 15px rgba(244, 63, 94, 0.2);
  
  /* Micro-animations */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-outfit);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

/* Utility Containers */
.app-container {
  max-width: 480px; /* Locked to mobile viewport for Mobile-First experience */
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #1e1b4b 0%, var(--bg-primary) 100%);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Typography & Headers */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.glow-text-emerald {
  color: var(--accent-emerald);
  text-shadow: 0 0 10px var(--accent-emerald-glow);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Inputs & Form Fields */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  font-family: var(--font-outfit);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Interactive Buttons with Micro-animations */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: center;
  font-family: var(--font-outfit);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

/* Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-item.active {
  color: var(--accent-emerald);
  text-shadow: 0 0 10px var(--accent-emerald-glow);
}

.nav-icon {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

/* Simple Micro-Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  border-top-color: var(--text-primary);
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

/* Slide up animation for Bottom Drawer Sheets */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.animate-slide-up {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scale in animation for Modals */
@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-scale-in {
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulse animation for stepper and alerts */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

.animate-pulse {
  animation: pulse 2s infinite ease-in-out;
}

