diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index f63a130..2e9bd96 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -195,26 +195,31 @@ export default function Dashboard() { - - - {shopAppointments.length} - Hoje - - - {shop.services.length} - Serviços - - - - {shop.products.reduce((sum, p) => sum + p.stock, 0)} - Produtos em stock - - ★ {shop.rating.toFixed(1)} - - - {activeTab === 'agenda' && ( + + + Marcações de Hoje + {shopAppointments.length} + + + + {shop.services.length} + Serviços + + + + {shop.products.reduce((sum, p) => sum + p.stock, 0)} + Stock + + + + ★ {shop.rating.toFixed(1)} + Avaliação + + + + Marcações a.status !== 'cancelado').length; const totalOrdersValue = myOrders.reduce((sum, o) => sum + o.total, 0); + const unreadCount = myNotifications.filter((n) => !n.read).length; if (!user) return null; @@ -123,35 +124,42 @@ export default function Profile() { - {/* Profile Card Header - Premium Styling */} + {/* Profile Card Header with Accent Bar */} - - {user.name.charAt(0).toUpperCase()} - - - {user.name} - {user.email} - - - {isBarber ? 'Gestor de Espaço' : 'Cliente'} + + + + + {user.name.charAt(0).toUpperCase()} + + + + {user.name} + {user.email} + + + {isBarber ? 'Gestor de Espaço' : 'Cliente'} + - {/* Stats Strip */} + {/* Stats Strip - Unified Card with Dividers */} {activeAppointmentsCount} {isBarber ? 'Marcações' : 'Agenda'} + {isBarber ? shopReviews.length : favoriteShops.length} {isBarber ? 'Reviews' : 'Favoritos'} + {isBarber ? (myShop?.rating || 0).toFixed(1) : currency(totalOrdersValue)} @@ -166,6 +174,11 @@ export default function Profile() { Notificações Recentes + {unreadCount > 0 && ( + + {unreadCount} + + )} {myNotifications.map((n) => ( @@ -432,29 +445,31 @@ export default function Profile() { )} {activeTab === 'estatisticas' && ( - - - - - - Total de Marcações - {myAppointments.length} + + + + + + + {myAppointments.length} + Total de Marcações - - - - - Rating Médio - {(myShop?.rating || 0).toFixed(1)} ★ + + + + + {(myShop?.rating || 0).toFixed(1)} ★ + Rating Médio - - - - - Vendas em Produtos - {currency(myOrders.reduce((sum, o) => sum + o.total, 0))} - - + + + + + + {currency(myOrders.reduce((sum, o) => sum + o.total, 0))} + Vendas em Produtos + + )} @@ -489,7 +504,7 @@ export default function Profile() { )} - {/* Logout Section with Premium Styling */} + {/* Logout Section */} Sair da Conta @@ -512,13 +527,12 @@ const styles = StyleSheet.create({ paddingBottom: 40, gap: 20, }, + + /* ── Profile Header ── */ profileHeader: { - flexDirection: 'row', - alignItems: 'center', - gap: 16, backgroundColor: colors.surfaceDark, borderRadius: radius.lg, - padding: 20, + overflow: 'hidden', shadowColor: colors.primaryDark, shadowOffset: { width: 0, height: 6 }, shadowOpacity: 0.1, @@ -528,6 +542,27 @@ const styles = StyleSheet.create({ borderColor: 'rgba(255,255,255,0.04)', marginTop: 6, }, + accentBar: { + height: 4, + backgroundColor: colors.primary, + width: '100%', + }, + profileHeaderInner: { + flexDirection: 'row', + alignItems: 'center', + gap: 16, + padding: 20, + }, + avatarRing: { + width: 72, + height: 72, + borderRadius: 36, + borderWidth: 2.5, + borderColor: 'rgba(15,118,110,0.35)', + alignItems: 'center', + justifyContent: 'center', + padding: 2, + }, avatarGradient: { width: 62, height: 62, @@ -535,16 +570,14 @@ const styles = StyleSheet.create({ backgroundColor: colors.primary, alignItems: 'center', justifyContent: 'center', - borderWidth: 2, - borderColor: 'rgba(255,255,255,0.18)', shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.1, + shadowOpacity: 0.15, shadowRadius: 4, }, avatarText: { color: colors.textInverse, - fontSize: 22, + fontSize: 24, fontWeight: '900', }, profileInfo: { @@ -579,23 +612,27 @@ const styles = StyleSheet.create({ fontWeight: '800', textTransform: 'uppercase', }, + + /* ── Stats Strip (unified card) ── */ statsStrip: { flexDirection: 'row', - gap: 10, + alignItems: 'center', + backgroundColor: colors.surface, + borderRadius: radius.lg, + borderWidth: 1, + borderColor: 'rgba(15,118,110,0.06)', + ...shadows.soft, }, profileStat: { flex: 1, - backgroundColor: colors.surface, - borderRadius: radius.lg, - padding: 14, - borderWidth: 1, - borderColor: 'rgba(15,118,110,0.06)', + paddingVertical: 14, + paddingHorizontal: 8, alignItems: 'center', - shadowColor: '#102018', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.03, - shadowRadius: 8, - elevation: 2, + }, + statsDivider: { + width: 1, + height: 32, + backgroundColor: colors.border, }, profileStatValue: { color: colors.text, @@ -609,6 +646,8 @@ const styles = StyleSheet.create({ textTransform: 'uppercase', marginTop: 2, }, + + /* ── Notifications ── */ sectionHeaderRow: { flexDirection: 'row', alignItems: 'center', @@ -620,6 +659,21 @@ const styles = StyleSheet.create({ fontSize: 16, fontWeight: '800', }, + notifCountBadge: { + backgroundColor: colors.danger, + borderRadius: radius.pill, + minWidth: 20, + height: 20, + alignItems: 'center', + justifyContent: 'center', + paddingHorizontal: 6, + marginLeft: 4, + }, + notifCountText: { + color: colors.textInverse, + fontSize: 11, + fontWeight: '800', + }, notifSection: { marginTop: 4, }, @@ -630,17 +684,13 @@ const styles = StyleSheet.create({ notifCard: { backgroundColor: colors.surface, width: 240, - borderRadius: radius.md, + borderRadius: radius.lg, padding: 14, marginRight: 12, borderWidth: 1, borderColor: 'rgba(15,118,110,0.06)', gap: 6, - shadowColor: '#102018', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.02, - shadowRadius: 6, - elevation: 1, + ...shadows.soft, }, notifUnread: { borderColor: 'rgba(15,118,110,0.2)', @@ -674,6 +724,8 @@ const styles = StyleSheet.create({ textTransform: 'uppercase', letterSpacing: 0.3, }, + + /* ── Tabs ── */ tabBarContainer: { marginVertical: 4, }, @@ -704,6 +756,8 @@ const styles = StyleSheet.create({ tabContent: { minHeight: 200, }, + + /* ── Lists & Empty ── */ listContainer: { gap: 12, }, @@ -730,17 +784,15 @@ const styles = StyleSheet.create({ fontSize: 14, fontWeight: '800', }, + + /* ── Agenda Cards ── */ agendaCard: { padding: 14, backgroundColor: colors.surface, borderRadius: radius.lg, borderWidth: 1, borderColor: 'rgba(15,118,110,0.06)', - shadowColor: '#102018', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.03, - shadowRadius: 8, - elevation: 2, + ...shadows.soft, }, agendaTop: { flexDirection: 'row', @@ -811,6 +863,8 @@ const styles = StyleSheet.create({ marginTop: 10, borderRadius: radius.md, }, + + /* ── Shop / Favorite Cards ── */ shopCard: { flexDirection: 'row', alignItems: 'center', @@ -820,11 +874,7 @@ const styles = StyleSheet.create({ borderRadius: radius.lg, borderWidth: 1, borderColor: 'rgba(15,118,110,0.06)', - shadowColor: '#102018', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.03, - shadowRadius: 8, - elevation: 2, + ...shadows.soft, }, shopIcon: { width: 44, @@ -875,6 +925,8 @@ const styles = StyleSheet.create({ fontWeight: '800', fontSize: 11, }, + + /* ── Order Cards ── */ orderCard: { padding: 14, gap: 10, @@ -882,11 +934,7 @@ const styles = StyleSheet.create({ borderRadius: radius.lg, borderWidth: 1, borderColor: 'rgba(15,118,110,0.06)', - shadowColor: '#102018', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.03, - shadowRadius: 8, - elevation: 2, + ...shadows.soft, }, orderTop: { flexDirection: 'row', @@ -914,6 +962,8 @@ const styles = StyleSheet.create({ fontSize: 16, fontWeight: '900', }, + + /* ── Review Cards ── */ reviewCard: { padding: 16, gap: 8, @@ -921,6 +971,7 @@ const styles = StyleSheet.create({ borderRadius: radius.lg, borderWidth: 1, borderColor: 'rgba(15,118,110,0.06)', + ...shadows.soft, }, reviewHeader: { flexDirection: 'row', @@ -942,7 +993,14 @@ const styles = StyleSheet.create({ lineHeight: 18, fontWeight: '400', }, - statCard: { + + /* ── Stats Grid (Barber Estatísticas Tab) ── */ + statsGrid: { + flexDirection: 'row', + gap: 12, + }, + statCardHalf: { + flex: 1, padding: 20, alignItems: 'center', gap: 6, @@ -950,11 +1008,17 @@ const styles = StyleSheet.create({ borderRadius: radius.lg, borderWidth: 1, borderColor: 'rgba(15,118,110,0.06)', - shadowColor: '#102018', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.03, - shadowRadius: 8, - elevation: 2, + ...shadows.soft, + }, + statCardFull: { + padding: 20, + alignItems: 'center', + gap: 6, + backgroundColor: colors.surface, + borderRadius: radius.lg, + borderWidth: 1, + borderColor: 'rgba(15,118,110,0.06)', + ...shadows.soft, }, statIconContainer: { width: 40, @@ -964,8 +1028,6 @@ const styles = StyleSheet.create({ alignItems: 'center', justifyContent: 'center', marginBottom: 4, - borderWidth: 1, - borderColor: 'rgba(15,118,110,0.04)', }, statLabel: { color: colors.textMuted, @@ -978,6 +1040,8 @@ const styles = StyleSheet.create({ fontSize: 24, fontWeight: '900', }, + + /* ── Review Modal ── */ reviewModal: { marginTop: 10, padding: 20, @@ -1013,6 +1077,8 @@ const styles = StyleSheet.create({ flexDirection: 'row', gap: 12, }, + + /* ── Logout ── */ logoutSection: { marginTop: 20, paddingTop: 20, @@ -1027,7 +1093,7 @@ const styles = StyleSheet.create({ backgroundColor: colors.dangerSoft, paddingVertical: 14, paddingHorizontal: 20, - borderRadius: radius.md, + borderRadius: radius.lg, width: '100%', borderWidth: 1, borderColor: 'rgba(239,68,68,0.18)',