package com.example.ui.screens import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyRow import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.* import androidx.compose.material.icons.outlined.* import androidx.compose.material3.* import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.testTag import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.example.data.model.* import com.example.ui.components.VerificationBadge import com.example.ui.theme.* import com.example.ui.util.Localization @Composable fun HomeScreen( companies: List, reports: List, warnings: List, lang: AppLanguage, onNavigateToSearch: (query: String?) -> Unit, onStartReport: () -> Unit, onSelectCompany: (String) -> Unit, onSelectWarning: (String) -> Unit, onSelectReportTrack: (String) -> Unit, onOpenAdmin: () -> Unit, isAdminMode: Boolean, modifier: Modifier = Modifier ) { val verifiedCompanies = companies.filter { it.status == VerificationStatus.VERIFIED_SAFE } val flaggedEntities = companies.filter { it.status == VerificationStatus.BLACKLISTED_SCAM || it.status == VerificationStatus.HIGH_RISK } LazyColumn( modifier = modifier .fillMaxSize() .background(MaterialTheme.colorScheme.background) .testTag("home_screen_container"), contentPadding = PaddingValues(bottom = 80.dp) ) { // Search Input Bar in Header / Canvas item { Surface( color = MaterialTheme.colorScheme.surface, border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), modifier = Modifier.fillMaxWidth() ) { Column( modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp, vertical = 12.dp) ) { // Geometric Search Bar with Search tag Surface( onClick = { onNavigateToSearch(null) }, shape = RoundedCornerShape(16.dp), color = LightSurfaceVariant, modifier = Modifier .fillMaxWidth() .height(48.dp) .testTag("home_search_bar_trigger") ) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier .fillMaxSize() .padding(start = 14.dp, end = 12.dp) ) { Icon( imageVector = Icons.Default.Search, contentDescription = "Search", tint = LightTextMuted, modifier = Modifier.size(20.dp) ) Spacer(modifier = Modifier.width(10.dp)) Text( text = if (lang == AppLanguage.BN) "কোম্পানি বা সন্দেহজনক সত্ত্বা খুঁজুন..." else "Search company or suspicious entity...", style = MaterialTheme.typography.bodyMedium.copy( color = LightTextMuted, fontSize = 13.sp ), maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f) ) VerticalDivider( modifier = Modifier .height(20.dp) .padding(horizontal = 8.dp), color = LightOutline ) Text( text = if (lang == AppLanguage.BN) "অনুসন্ধান" else "Search", style = MaterialTheme.typography.labelMedium.copy( color = BrandBlueAccent, fontWeight = FontWeight.Bold, fontSize = 12.sp ) ) } } } } } // Quick Stats Strip item { Surface( color = MaterialTheme.colorScheme.surface, modifier = Modifier .fillMaxWidth() .padding(top = 12.dp, start = 16.dp, end = 16.dp), shape = RoundedCornerShape(20.dp), border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), shadowElevation = 1.dp ) { Row( modifier = Modifier .fillMaxWidth() .padding(vertical = 12.dp, horizontal = 8.dp), horizontalArrangement = Arrangement.SpaceEvenly, verticalAlignment = Alignment.CenterVertically ) { StatMetric( label = if (lang == AppLanguage.BN) "যাচাইকৃত প্রতিষ্ঠান" else "Verified Firms", value = "${verifiedCompanies.size * 12 + 180}+", icon = Icons.Default.Verified, color = StatusVerifiedGreen ) VerticalDivider( modifier = Modifier.height(32.dp), color = LightOutline ) StatMetric( label = if (lang == AppLanguage.BN) "নাগরিক অভিযোগ" else "Scam Reports", value = "${reports.size * 45 + 520}+", icon = Icons.Default.WarningAmber, color = StatusWarningRed ) VerticalDivider( modifier = Modifier.height(32.dp), color = LightOutline ) StatMetric( label = if (lang == AppLanguage.BN) "উদ্ধারকৃত অর্থ" else "Loss Prevented", value = if (lang == AppLanguage.BN) "৳৪.৮ কোটি" else "৳48M+", icon = Icons.Default.AccountBalanceWallet, color = BrandNavyLight ) } } } // 2-Column Geometric Balance Action Buttons item { Column(modifier = Modifier.padding(top = 12.dp, start = 16.dp, end = 16.dp)) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(12.dp) ) { // Verify Action Card Surface( onClick = { onNavigateToSearch(null) }, shape = RoundedCornerShape(24.dp), color = MaterialTheme.colorScheme.surface, border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), shadowElevation = 1.dp, modifier = Modifier .weight(1f) .testTag("btn_home_search_entity") ) { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.padding(16.dp) ) { Box( modifier = Modifier .size(48.dp) .clip(RoundedCornerShape(16.dp)) .background(StatusVerifiedGreenBg), contentAlignment = Alignment.Center ) { Icon( imageVector = Icons.Default.Verified, contentDescription = "Verify", tint = StatusVerifiedGreen, modifier = Modifier.size(26.dp) ) } Spacer(modifier = Modifier.height(8.dp)) Text( text = "VERIFY", style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontWeight = FontWeight.ExtraBold, letterSpacing = 1.sp, fontSize = 10.sp ) ) Text( text = if (lang == AppLanguage.BN) "যাচাই করুন" else "Check Company", style = MaterialTheme.typography.titleSmall.copy( fontWeight = FontWeight.Bold, color = LightTextPrimary, fontSize = 13.sp ) ) } } // Report Action Card Surface( onClick = onStartReport, shape = RoundedCornerShape(24.dp), color = MaterialTheme.colorScheme.surface, border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), shadowElevation = 1.dp, modifier = Modifier .weight(1f) .testTag("btn_home_start_report") ) { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.padding(16.dp) ) { Box( modifier = Modifier .size(48.dp) .clip(RoundedCornerShape(16.dp)) .background(StatusWarningRedBg), contentAlignment = Alignment.Center ) { Icon( imageVector = Icons.Default.AddAlert, contentDescription = "Report", tint = StatusWarningRed, modifier = Modifier.size(26.dp) ) } Spacer(modifier = Modifier.height(8.dp)) Text( text = "REPORT", style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontWeight = FontWeight.ExtraBold, letterSpacing = 1.sp, fontSize = 10.sp ) ) Text( text = if (lang == AppLanguage.BN) "রিপোর্ট করুন" else "Report a Scam", style = MaterialTheme.typography.titleSmall.copy( fontWeight = FontWeight.Bold, color = LightTextPrimary, fontSize = 13.sp ) ) } } } if (isAdminMode) { Spacer(modifier = Modifier.height(10.dp)) Surface( onClick = onOpenAdmin, color = StatusAmberBg, shape = RoundedCornerShape(16.dp), border = androidx.compose.foundation.BorderStroke(1.dp, StatusAmber.copy(alpha = 0.5f)), modifier = Modifier .fillMaxWidth() .testTag("btn_home_admin_panel") ) { Row( modifier = Modifier.padding(14.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.SpaceBetween ) { Row(verticalAlignment = Alignment.CenterVertically) { Icon( imageVector = Icons.Default.AdminPanelSettings, contentDescription = null, tint = Color(0xFFB45309) ) Spacer(modifier = Modifier.width(8.dp)) Text( text = if (lang == AppLanguage.BN) "অ্যাডমিন রিভিউ প্যানেল (রিপোর্ট যাচাই ও অনুমোদন)" else "Admin Review Panel (Verify & Approve Reports)", style = MaterialTheme.typography.titleSmall.copy( color = Color(0xFFB45309), fontWeight = FontWeight.Bold ) ) } Icon( imageVector = Icons.Default.ChevronRight, contentDescription = null, tint = Color(0xFFB45309) ) } } } } } // Geometric Navy Alert Hero Card item { val featuredWarning = warnings.firstOrNull() if (featuredWarning != null) { Box( modifier = Modifier .fillMaxWidth() .padding(top = 16.dp, start = 16.dp, end = 16.dp) .clip(RoundedCornerShape(24.dp)) .background(Color(0xFF1E3A8A)) .clickable { onSelectWarning(featuredWarning.id) } ) { // Geometric Watermark Circle Box( modifier = Modifier .size(130.dp) .align(Alignment.BottomEnd) .offset(x = 24.dp, y = 24.dp) .background(Color(0xFF1D4ED8).copy(alpha = 0.35f), CircleShape) ) Column( modifier = Modifier .fillMaxWidth() .padding(20.dp) ) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(bottom = 8.dp) ) { Surface( color = StatusWarningRed, shape = RoundedCornerShape(6.dp) ) { Text( text = "URGENT ALERT", style = MaterialTheme.typography.labelSmall.copy( color = Color.White, fontWeight = FontWeight.Black, letterSpacing = 1.sp, fontSize = 9.sp ), modifier = Modifier.padding(horizontal = 6.dp, vertical = 2.dp) ) } Spacer(modifier = Modifier.width(8.dp)) Text( text = "• ${featuredWarning.division}", style = MaterialTheme.typography.bodySmall.copy( color = Color.White.copy(alpha = 0.85f), fontSize = 11.sp ) ) } Text( text = if (lang == AppLanguage.BN) featuredWarning.titleBn else featuredWarning.titleEn, style = MaterialTheme.typography.titleMedium.copy( color = Color.White, fontWeight = FontWeight.Bold, fontSize = 16.sp, lineHeight = 22.sp ), maxLines = 2, overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.height(6.dp)) Text( text = if (lang == AppLanguage.BN) featuredWarning.summaryBn else featuredWarning.summaryEn, style = MaterialTheme.typography.bodySmall.copy( color = Color.White.copy(alpha = 0.9f), fontWeight = FontWeight.Normal, fontSize = 12.sp, lineHeight = 17.sp ), maxLines = 2, overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.height(14.dp)) Surface( onClick = { onSelectWarning(featuredWarning.id) }, shape = RoundedCornerShape(12.dp), color = Color.White, modifier = Modifier.height(34.dp) ) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(horizontal = 14.dp) ) { Text( text = if (lang == AppLanguage.BN) "সম্পূর্ণ সতর্কবার্তা দেখুন" else "View Full Warning", style = MaterialTheme.typography.labelMedium.copy( color = Color(0xFF1E3A8A), fontWeight = FontWeight.ExtraBold, fontSize = 11.sp ) ) } } } } } } // Urgent Public Warnings Ticker / Cards item { Column(modifier = Modifier.padding(top = 24.dp)) { Row( modifier = Modifier .fillMaxWidth() .padding(start = 16.dp, end = 16.dp, bottom = 10.dp), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Row(verticalAlignment = Alignment.CenterVertically) { Icon( imageVector = Icons.Default.Campaign, contentDescription = null, tint = StatusWarningRed, modifier = Modifier.size(20.dp) ) Spacer(modifier = Modifier.width(6.dp)) Text( text = if (lang == AppLanguage.BN) "জরুরি সাইবার সতর্কতা (Public Alerts)" else "Urgent Public Alerts", style = MaterialTheme.typography.titleMedium.copy( fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onBackground ) ) } Text( text = if (lang == AppLanguage.BN) "সব দেখুন" else "View All", style = MaterialTheme.typography.labelMedium.copy( color = BrandBlueAccent, fontWeight = FontWeight.Bold ), modifier = Modifier.clickable { onNavigateToSearch(null) } ) } LazyRow( contentPadding = PaddingValues(horizontal = 16.dp), horizontalArrangement = Arrangement.spacedBy(12.dp) ) { items(warnings) { warning -> PublicWarningCard( warning = warning, lang = lang, onClick = { onSelectWarning(warning.id) }, modifier = Modifier.width(290.dp) ) } } } } // Verified Bangladeshi Companies Carousel item { Column(modifier = Modifier.padding(top = 24.dp)) { Row( modifier = Modifier .fillMaxWidth() .padding(start = 16.dp, end = 16.dp, bottom = 10.dp), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Row(verticalAlignment = Alignment.CenterVertically) { Icon( imageVector = Icons.Default.Verified, contentDescription = null, tint = StatusVerifiedGreen, modifier = Modifier.size(20.dp) ) Spacer(modifier = Modifier.width(6.dp)) Text( text = if (lang == AppLanguage.BN) "যাচাইকৃত নিরাপদ প্রতিষ্ঠান" else "Verified Safe Companies", style = MaterialTheme.typography.titleMedium.copy( fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onBackground ) ) } } LazyRow( contentPadding = PaddingValues(horizontal = 16.dp), horizontalArrangement = Arrangement.spacedBy(12.dp) ) { items(verifiedCompanies) { company -> CompanyItemCard( company = company, lang = lang, onClick = { onSelectCompany(company.id) }, modifier = Modifier.width(260.dp) ) } } } } // High Risk / Blacklisted Alerts Section item { Column(modifier = Modifier.padding(top = 24.dp, start = 16.dp, end = 16.dp)) { Row( modifier = Modifier .fillMaxWidth() .padding(bottom = 10.dp), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Row(verticalAlignment = Alignment.CenterVertically) { Icon( imageVector = Icons.Default.Dangerous, contentDescription = null, tint = StatusWarningRed, modifier = Modifier.size(20.dp) ) Spacer(modifier = Modifier.width(6.dp)) Text( text = if (lang == AppLanguage.BN) "কালোতালিকাভুক্ত প্রতারক চক্র" else "Blacklisted & High Risk Entities", style = MaterialTheme.typography.titleMedium.copy( fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onBackground ) ) } } flaggedEntities.forEach { entity -> Surface( onClick = { onSelectCompany(entity.id) }, shape = RoundedCornerShape(12.dp), color = StatusWarningRedBg, border = androidx.compose.foundation.BorderStroke(1.dp, StatusWarningRed.copy(alpha = 0.3f)), modifier = Modifier .fillMaxWidth() .padding(bottom = 10.dp) .testTag("blacklisted_item_${entity.id}") ) { Row( modifier = Modifier.padding(12.dp), verticalAlignment = Alignment.CenterVertically ) { Box( modifier = Modifier .size(36.dp) .clip(CircleShape) .background(StatusWarningRed.copy(alpha = 0.15f)), contentAlignment = Alignment.Center ) { Icon( imageVector = Icons.Default.Warning, contentDescription = null, tint = StatusWarningRed, modifier = Modifier.size(20.dp) ) } Spacer(modifier = Modifier.width(12.dp)) Column(modifier = Modifier.weight(1f)) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth() ) { Text( text = if (lang == AppLanguage.BN) entity.nameBn else entity.nameEn, style = MaterialTheme.typography.titleSmall.copy( fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onSurface ), maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f) ) VerificationBadge(status = entity.status, lang = lang) } Spacer(modifier = Modifier.height(4.dp)) Text( text = if (lang == AppLanguage.BN) entity.summaryBn else entity.summaryEn, style = MaterialTheme.typography.bodySmall.copy( color = LightTextSecondary, fontSize = 11.sp ), maxLines = 2, overflow = TextOverflow.Ellipsis ) } } } } } } // Recent Community Reports & Tracking Quick Link item { Column(modifier = Modifier.padding(top = 24.dp, start = 16.dp, end = 16.dp)) { Text( text = if (lang == AppLanguage.BN) "সাম্প্রতিক নাগরিক অভিযোগ ও স্ট্যাটাস" else "Recent Citizen Reports", style = MaterialTheme.typography.titleMedium.copy( fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onBackground ), modifier = Modifier.padding(bottom = 12.dp) ) reports.take(3).forEach { report -> Surface( onClick = { onSelectReportTrack(report.id) }, shape = RoundedCornerShape(12.dp), color = MaterialTheme.colorScheme.surface, border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), modifier = Modifier .fillMaxWidth() .padding(bottom = 10.dp) .testTag("report_item_${report.id}") ) { Column(modifier = Modifier.padding(14.dp)) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Text( text = report.id, style = MaterialTheme.typography.labelMedium.copy( color = BrandBlueAccent, fontWeight = FontWeight.Bold ) ) Text( text = Localization.getReportStatusText(report.status, lang), style = MaterialTheme.typography.labelSmall.copy( color = when (report.status) { ReportStatus.VERIFIED_WARNING_ISSUED -> StatusWarningRed ReportStatus.LEGAL_ESCALATION -> Color(0xFF7E22CE) ReportStatus.PENDING_REVIEW -> StatusAmber else -> LightTextMuted }, fontWeight = FontWeight.Bold ) ) } Spacer(modifier = Modifier.height(6.dp)) Text( text = report.targetEntityName, style = MaterialTheme.typography.bodyMedium.copy( fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onSurface ) ) Spacer(modifier = Modifier.height(4.dp)) Text( text = report.incidentDescription, style = MaterialTheme.typography.bodySmall.copy( color = LightTextSecondary, fontSize = 12.sp ), maxLines = 2, overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.height(8.dp)) Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween ) { Text( text = "${if (lang == AppLanguage.BN) "ক্ষতি:" else "Lost:"} ${Localization.formatCurrency(report.moneyLostBdt, lang)}", style = MaterialTheme.typography.labelSmall.copy( color = StatusWarningRed, fontWeight = FontWeight.Bold ) ) Text( text = "${report.city} • ${report.dateReported}", style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontSize = 11.sp ) ) } } } } } } } } @Composable fun StatMetric( label: String, value: String, icon: ImageVector, color: Color ) { Column( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.padding(horizontal = 4.dp) ) { Icon( imageVector = icon, contentDescription = null, tint = color, modifier = Modifier.size(18.dp) ) Spacer(modifier = Modifier.height(4.dp)) Text( text = value, style = MaterialTheme.typography.titleMedium.copy( fontWeight = FontWeight.Black, fontSize = 16.sp, color = MaterialTheme.colorScheme.onSurface ) ) Text( text = label, style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontSize = 10.sp ), textAlign = androidx.compose.ui.text.style.TextAlign.Center ) } } @Composable fun QuickActionCard( title: String, subtitle: String, icon: ImageVector, containerColor: Color, iconColor: Color, onClick: () -> Unit, testTag: String, modifier: Modifier = Modifier ) { Surface( onClick = onClick, shape = RoundedCornerShape(12.dp), color = containerColor, modifier = modifier .height(84.dp) .testTag(testTag) ) { Row( modifier = Modifier .fillMaxSize() .padding(12.dp), verticalAlignment = Alignment.CenterVertically ) { Box( modifier = Modifier .size(40.dp) .clip(CircleShape) .background(iconColor.copy(alpha = 0.2f)), contentAlignment = Alignment.Center ) { Icon( imageVector = icon, contentDescription = title, tint = iconColor, modifier = Modifier.size(22.dp) ) } Spacer(modifier = Modifier.width(10.dp)) Column { Text( text = title, style = MaterialTheme.typography.titleSmall.copy( fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onSurface, fontSize = 13.sp ), maxLines = 1 ) Text( text = subtitle, style = MaterialTheme.typography.bodySmall.copy( color = LightTextMuted, fontSize = 11.sp ), maxLines = 1 ) } } } } @Composable fun PublicWarningCard( warning: PublicWarning, lang: AppLanguage, onClick: () -> Unit, modifier: Modifier = Modifier ) { Surface( onClick = onClick, shape = RoundedCornerShape(20.dp), color = MaterialTheme.colorScheme.surface, border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), shadowElevation = 1.dp, modifier = modifier ) { Column(modifier = Modifier.padding(14.dp)) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Surface( color = StatusWarningRedBg, shape = RoundedCornerShape(6.dp), border = androidx.compose.foundation.BorderStroke(1.dp, StatusWarningRed.copy(alpha = 0.2f)) ) { Text( text = if (lang == AppLanguage.BN) "⚠️ জরুরি সতর্কতা" else "⚠️ ALERT", style = MaterialTheme.typography.labelSmall.copy( color = StatusWarningRed, fontWeight = FontWeight.ExtraBold, fontSize = 9.sp, letterSpacing = 0.5.sp ), modifier = Modifier.padding(horizontal = 6.dp, vertical = 2.dp) ) } Text( text = warning.division, style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontSize = 10.sp, fontWeight = FontWeight.Medium ) ) } Spacer(modifier = Modifier.height(8.dp)) Text( text = if (lang == AppLanguage.BN) warning.titleBn else warning.titleEn, style = MaterialTheme.typography.titleSmall.copy( fontWeight = FontWeight.Bold, color = LightTextPrimary, lineHeight = 18.sp ), maxLines = 2, overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.height(6.dp)) Text( text = if (lang == AppLanguage.BN) warning.summaryBn else warning.summaryEn, style = MaterialTheme.typography.bodySmall.copy( color = LightTextSecondary, fontSize = 11.sp, lineHeight = 16.sp ), maxLines = 2, overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.height(10.dp)) Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Text( text = "${if (lang == AppLanguage.BN) "ভুক্তভোগী:" else "Victims:"} ${Localization.formatNumber(warning.victimsCount, lang)}+", style = MaterialTheme.typography.labelSmall.copy( color = StatusWarningRed, fontWeight = FontWeight.SemiBold ) ) Text( text = if (lang == AppLanguage.BN) "বিস্তারিত দেখুন ›" else "Details ›", style = MaterialTheme.typography.labelSmall.copy( color = BrandBlueAccent, fontWeight = FontWeight.Bold ) ) } } } } @Composable fun CompanyItemCard( company: Company, lang: AppLanguage, onClick: () -> Unit, modifier: Modifier = Modifier ) { val initialLetter = (if (lang == AppLanguage.BN) company.nameBn else company.nameEn) .firstOrNull()?.toString()?.uppercase() ?: "C" Surface( onClick = onClick, shape = RoundedCornerShape(20.dp), color = MaterialTheme.colorScheme.surface, border = androidx.compose.foundation.BorderStroke(1.dp, LightOutline), shadowElevation = 1.dp, modifier = modifier ) { Column(modifier = Modifier.padding(14.dp)) { Row( modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically ) { Box( modifier = Modifier .size(42.dp) .clip(RoundedCornerShape(12.dp)) .background(LightSurfaceVariant) .border(1.dp, LightOutline, RoundedCornerShape(12.dp)), contentAlignment = Alignment.Center ) { Text( text = initialLetter, style = MaterialTheme.typography.titleMedium.copy( fontWeight = FontWeight.Black, color = BrandNavyLight, fontSize = 17.sp ) ) } Spacer(modifier = Modifier.width(10.dp)) Column(modifier = Modifier.weight(1f)) { Text( text = if (lang == AppLanguage.BN) company.nameBn else company.nameEn, style = MaterialTheme.typography.titleSmall.copy( fontWeight = FontWeight.Bold, color = LightTextPrimary ), maxLines = 1, overflow = TextOverflow.Ellipsis ) Text( text = company.category, style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontSize = 11.sp ) ) } } Spacer(modifier = Modifier.height(10.dp)) Surface( color = LightSurfaceVariant, shape = RoundedCornerShape(10.dp), modifier = Modifier.fillMaxWidth() ) { Column(modifier = Modifier.padding(8.dp)) { Text( text = "RJSC: ${company.rjscRegNo}", style = MaterialTheme.typography.labelSmall.copy( color = LightTextSecondary, fontSize = 10.sp, fontWeight = FontWeight.Medium ) ) Text( text = "Trade Lic: ${company.tradeLicenseNo}", style = MaterialTheme.typography.labelSmall.copy( color = LightTextSecondary, fontSize = 10.sp, fontWeight = FontWeight.Medium ), maxLines = 1, overflow = TextOverflow.Ellipsis ) } } Spacer(modifier = Modifier.height(8.dp)) Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { VerificationBadge(status = company.status, lang = lang) Text( text = "${company.city}", style = MaterialTheme.typography.labelSmall.copy( color = LightTextMuted, fontSize = 11.sp ) ) } } } }