<Window x:Class="RevitEstimate.SteelEstimateWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Reinforcement (Steel) Estimation" Height="600" Width="1000" WindowStartupLocation="CenterScreen">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock Text="Steel Calculation: Actual vs Thumb Rule" FontSize="18" FontWeight="Bold" Margin="0,0,0,10"/>

        <TabControl Grid.Row="1">
            <!-- TAB 1: OVERALL SUMMARY -->
            <TabItem Header="Overall Summary (Comparison)">
                <DataGrid x:Name="GridSummary" AutoGenerateColumns="False" CanUserAddRows="False" AlternatingRowBackground="#FFF0F0F0">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="Element Category" Binding="{Binding CategoryName}" Width="200" IsReadOnly="True" FontWeight="Bold"/>
                        <DataGridTextColumn Header="Concrete Vol (Cum)" Binding="{Binding ConcreteVolume, StringFormat=N2}" Width="150" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Thumb Rule %" Binding="{Binding ThumbRulePercent, StringFormat=N2}" Width="120" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Expected Steel (Kg)" Binding="{Binding ThumbRuleWeight, StringFormat=N2}" Width="150" IsReadOnly="True" Foreground="Blue"/>
                        <DataGridTextColumn Header="Actual Modeled Steel (Kg)" Binding="{Binding ActualWeight, StringFormat=N2}" Width="180" IsReadOnly="True" Foreground="Green" FontWeight="Bold"/>
                        <DataGridTextColumn Header="Variance (Kg)" Binding="{Binding Variance, StringFormat=N2}" Width="120" IsReadOnly="True"/>
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>

            <!-- TAB 2: DETAILED ACTUAL REBAR -->
            <TabItem Header="Detailed (Actual Individual Bars)">
                <DataGrid x:Name="GridDetailed" AutoGenerateColumns="False" CanUserAddRows="False" AlternatingRowBackground="#FFF0F0F0">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="Rebar ID" Binding="{Binding RebarId}" Width="100" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Host Element" Binding="{Binding HostName}" Width="180" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Category" Binding="{Binding HostCategory}" Width="150" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Bar Dia (mm)" Binding="{Binding BarDiameter, StringFormat=N0}" Width="100" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Total Length (m)" Binding="{Binding TotalLength, StringFormat=N2}" Width="120" IsReadOnly="True"/>
                        <DataGridTextColumn Header="Actual Weight (Kg)" Binding="{Binding Weight, StringFormat=N2}" Width="150" IsReadOnly="True" FontWeight="Bold"/>
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>
        </TabControl>
    </Grid>
</Window>