/* =============================================
   MOBILE-FIRST MODERN UI STYLESHEET
   Minimal & Contemporary Design System
   ============================================= */

:root {
  /* Primary Colors */
  --primary: #4F6BED;
  --primary-light: #E8EBFD;
  --primary-dark: #3D5BD9;
  
  /* Secondary Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  
  /* Neutral Colors */
  --text-dark: #1F2937;
  --text-medium: #6B7280;
  --text-light: #9CA3AF;
  --bg-body: #F3F4F6;
  --bg-white: #FFFFFF;
  --border: #E5E7EB;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 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);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   MOBILE HEADER
   ============================================= */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-sm);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.mobile-header .menu-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 18px;
}

.mobile-header .logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.mobile-header .logo-img {
  height: 32px;
  width: auto;
}

.mobile-header .header-actions {
  display: flex;
  gap: var(--space-sm);
}

.mobile-header .header-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-medium);
  font-size: 18px;
}

/* =============================================
   MOBILE SIDEBAR / DRAWER
   ============================================= */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: var(--bg-white);
  z-index: 1002;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-sidebar.active {
  left: 0;
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sidebar-header .logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.sidebar-header .logo-text h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.sidebar-header .logo-text p {
  font-size: 12px;
  color: var(--text-light);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--space-lg);
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  text-decoration: none;
  margin-bottom: var(--space-xs);
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--bg-body);
  color: var(--text-dark);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item i {
  font-size: 20px;
}

.nav-item span {
  font-size: 14px;
  font-weight: 500;
}

.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border);
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.mobile-content {
  padding-top: 50px;
  min-height: 100vh;
}

.content-wrapper {
  padding: var(--space-md);
}

/* Page Header */
.page-title {
  margin-bottom: var(--space-lg);
}

.page-title h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

.page-title .greeting {
  font-size: 14px;
  color: var(--text-medium);
}

.page-title .date-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-medium);
  margin-top: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

/* =============================================
   STAT CARDS
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 18px;
}

.stat-card .stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-card .stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--danger-light); color: var(--danger); }

.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-medium);
  margin-top: var(--space-xs);
}

.stat-card .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-top: var(--space-sm);
  padding: 2px 6px;
  border-radius: 4px;
}

.stat-card .stat-change.positive { background: var(--success-light); color: var(--success); }
.stat-card .stat-change.negative { background: var(--danger-light); color: var(--danger); }

/* =============================================
   SHOP CARDS
   ============================================= */
.shop-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--space-md);
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}

.shop-card:active {
  transform: scale(0.98);
}

.shop-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.shop-card-header .shop-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border);
}

.shop-card-header .shop-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.shop-card-header .shop-info p {
  font-size: 12px;
  color: var(--text-light);
}

.shop-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.shop-stat-item {
  text-align: center;
}

.shop-stat-item .label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.shop-stat-item .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.shop-stat-item .value.green { color: var(--success); }
.shop-stat-item .value.orange { color: var(--warning); }

/* =============================================
   SECTION CARDS
   ============================================= */
.section-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.section-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.section-header .view-all {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.section-body {
  padding: var(--space-lg);
}

/* =============================================
   PAYMENT BREAKDOWN
   ============================================= */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.payment-item {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-body);
  border-radius: var(--radius-sm);
}

.payment-item .icon {
  width: 36px;
  height: 36px;
  margin: 0 auto var(--space-sm);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.payment-item .icon.visa { background: #E8EBFD; color: #4F6BED; }
.payment-item .icon.cash { background: #D1FAE5; color: #10B981; }
.payment-item .icon.other { background: #FEF3C7; color: #F59E0B; }

.payment-item .label {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 2px;
}

.payment-item .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

/* =============================================
   LIST ITEMS
   ============================================= */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

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

.list-item .item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.list-item .item-content {
  flex: 1;
  min-width: 0;
}

.list-item .item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.list-item .item-subtitle {
  font-size: 12px;
  color: var(--text-light);
}

.list-item .item-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: right;
}

.list-item .item-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.list-item .item-badge.success { background: var(--success-light); color: var(--success); }
.list-item .item-badge.warning { background: var(--warning-light); color: var(--warning); }
.list-item .item-badge.danger { background: var(--danger-light); color: var(--danger); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-medium);
}

.btn-outline:active {
  background: var(--bg-body);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* =============================================
   TABLES (Mobile Optimized)
   ============================================= */
.mobile-table {
  width: 100%;
}

.table-row {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  gap: var(--space-md);
}

.table-row:last-child {
  border-bottom: none;
}

/* =============================================
   BOTTOM NAV
   ============================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  padding: var(--space-xs);
}

.bottom-nav-item i {
  font-size: 20px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

/* Add padding to content when bottom nav is present */
.has-bottom-nav .mobile-content {
  padding-bottom: 70px;
}

/* =============================================
   UTILITIES
   ============================================= */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-light) !important; }

.bg-primary { background: var(--primary-light) !important; }
.bg-success { background: var(--success-light) !important; }
.bg-warning { background: var(--warning-light) !important; }
.bg-danger { background: var(--danger-light) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-sm) !important; }
.mb-2 { margin-bottom: var(--space-md) !important; }
.mb-3 { margin-bottom: var(--space-lg) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-sm) !important; }
.mt-2 { margin-top: var(--space-md) !important; }
.mt-3 { margin-top: var(--space-lg) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-sm) !important; }
.p-2 { padding: var(--space-md) !important; }
.p-3 { padding: var(--space-lg) !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.hidden { display: none !important; }

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

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Stagger animation for cards */
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }
