<Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="using:UniGetUI.Avalonia.Views.Controls">

    <Styles.Resources>
        <ResourceDictionary>
            <ResourceDictionary.ThemeDictionaries>
                <!-- WinUI Fluent v2 design tokens (Avalonia's Fluent theme only ships UWP-era names; these polyfill the v2 set). -->
                <ResourceDictionary x:Key="Light">
                    <!-- Accent fills -->
                    <SolidColorBrush x:Key="AccentFillColorDefaultBrush"  Color="{DynamicResource SystemAccentColor}"/>
                    <SolidColorBrush x:Key="AccentFillColorSecondaryBrush" Color="{DynamicResource SystemAccentColorDark1}"/>
                    <SolidColorBrush x:Key="AccentFillColorTertiaryBrush"  Color="{DynamicResource SystemAccentColorDark2}"/>
                    <SolidColorBrush x:Key="AccentFillColorDisabledBrush"  Color="#37000000"/>
                    <SolidColorBrush x:Key="AccentFillColorSelectedTextBackgroundBrush" Color="{DynamicResource SystemAccentColor}"/>
                    <!-- Subtle fills (WinUI NavigationViewItem hover/selected backgrounds) -->
                    <SolidColorBrush x:Key="SubtleFillColorSecondaryBrush" Color="#09000000"/>
                    <SolidColorBrush x:Key="SubtleFillColorTertiaryBrush"  Color="#06000000"/>
                    <!-- Accent text (darker accents read better on light bg) -->
                    <SolidColorBrush x:Key="AccentTextFillColorPrimaryBrush"   Color="{DynamicResource SystemAccentColorDark2}"/>
                    <SolidColorBrush x:Key="AccentTextFillColorSecondaryBrush" Color="{DynamicResource SystemAccentColorDark3}"/>
                    <SolidColorBrush x:Key="AccentTextFillColorTertiaryBrush"  Color="{DynamicResource SystemAccentColorDark1}"/>
                    <SolidColorBrush x:Key="AccentTextFillColorDisabledBrush"  Color="#5C000000"/>
                    <!-- Hyperlinks: fixed blue, decoupled from the accent so links stay readable over accent-tinted Mica -->
                    <SolidColorBrush x:Key="HyperlinkForeground"               Color="#1C5FB8"/>
                    <!-- Text fill -->
                    <SolidColorBrush x:Key="TextFillColorPrimaryBrush"   Color="#E4000000"/>
                    <SolidColorBrush x:Key="TextFillColorSecondaryBrush" Color="#9E000000"/>
                    <SolidColorBrush x:Key="TextFillColorTertiaryBrush"  Color="#72000000"/>
                    <!-- Search-box placeholders. The big Discover field uses larger (thicker-stroked) text, so it
                         gets a lighter light-theme value to read as the same weight as the compact title-bar field. -->
                    <SolidColorBrush x:Key="SearchBoxPlaceholderForeground"   Color="#72000000"/>
                    <SolidColorBrush x:Key="MegaQueryPlaceholderForeground"   Color="#52000000"/>
                    <SolidColorBrush x:Key="SearchBoxInactiveBackground"      Color="#B3FFFFFF"/>
                    <SolidColorBrush x:Key="SearchBoxFocusedBackground"       Color="#FFFFFFFF"/>
                    <SolidColorBrush x:Key="SearchBoxFocusedBorderBrush"      Color="#0F000000"/>
                    <SolidColorBrush x:Key="TextFillColorDisabledBrush"  Color="#5C000000"/>
                    <SolidColorBrush x:Key="TextFillColorInverseBrush"   Color="#FFFFFFFF"/>
                    <!-- Opaque WinUI menu surface and low-contrast divider. -->
                    <SolidColorBrush x:Key="MenuSurfaceBrush"            Color="#FFFFFFFF"/>
                    <SolidColorBrush x:Key="MenuSurfaceBorderBrush"      Color="#0F000000"/>
                    <SolidColorBrush x:Key="MenuDividerBrush"            Color="#0F000000"/>
                    <!-- Text on accent -->
                    <SolidColorBrush x:Key="TextOnAccentFillColorPrimaryBrush"      Color="#FFFFFFFF"/>
                    <SolidColorBrush x:Key="TextOnAccentFillColorSecondaryBrush"    Color="#B3FFFFFF"/>
                    <SolidColorBrush x:Key="TextOnAccentFillColorDisabledBrush"     Color="#FFFFFFFF"/>
                    <SolidColorBrush x:Key="TextOnAccentFillColorSelectedTextBrush" Color="#FFFFFFFF"/>
                    <!-- Settings cards -->
                    <SolidColorBrush x:Key="SettingsCardBackground"      Color="#B3FFFFFF"/>
                    <SolidColorBrush x:Key="SettingsCardBorderBrush"     Color="#ECECEC"/>
                    <SolidColorBrush x:Key="SettingsCardHoverBackground" Color="#F6F6F6"/>
                    <!-- WinUI dropdown controls use the same control/card fill as settings actions. -->
                    <StaticResource x:Key="ComboBoxBackground" ResourceKey="SettingsCardBackground"/>
                    <StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SettingsCardBackground"/>
                    <StaticResource x:Key="ComboBoxBackgroundPointerOver" ResourceKey="SettingsCardHoverBackground"/>
                    <StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SettingsCardHoverBackground"/>
                    <SolidColorBrush x:Key="ComboBoxBorderBrush" Color="Transparent"/>
                    <SolidColorBrush x:Key="ComboBoxBackgroundBorderBrushUnfocused" Color="Transparent"/>
                    <SolidColorBrush x:Key="ComboBoxBorderBrushPointerOver" Color="Transparent"/>
                    <SolidColorBrush x:Key="ComboBoxBorderBrushPressed" Color="Transparent"/>
                    <!-- Package list container; near-transparent over Mica (see Styles.WindowsMica) -->
                    <SolidColorBrush x:Key="PackageListBackground"       Color="#FBFBFB"/>
                    <!-- Column header: WinUI default button (ControlFillColorDefault fill + ControlStrokeColorDefault border) -->
                    <SolidColorBrush x:Key="PackageListHeaderBackground" Color="#B3FFFFFF"/>
                    <SolidColorBrush x:Key="PackageListHeaderBorderBrush" Color="#0F000000"/>
                    <!-- Subtle header hover/press (WinUI-style), over the rest fill -->
                    <SolidColorBrush x:Key="DataGridColumnHeaderHoveredBackgroundBrush" Color="#05000000"/>
                    <SolidColorBrush x:Key="DataGridColumnHeaderPressedBackgroundBrush" Color="#14000000"/>
                    <!-- Window structure -->
                    <SolidColorBrush x:Key="AppWindowBackground"         Color="#F3F3F3"/>
                    <SolidColorBrush x:Key="AppTitleBarBackground"       Color="#F3F3F3"/>
                    <!-- Window/page surface; overridden to Transparent by Styles.WindowsMica when Mica is active -->
                    <SolidColorBrush x:Key="MicaPageBackground"          Color="#F3F3F3"/>
                    <SolidColorBrush x:Key="AppSplitterBackground"       Color="#E5E5E5"/>
                    <SolidColorBrush x:Key="AppOperationsPanelBackground" Color="#EEEEEE"/>
                    <SolidColorBrush x:Key="AppBorderBrush"              Color="#E5E5E5"/>
                    <SolidColorBrush x:Key="AppBadgeBackground"          Color="#EDEDED"/>
                    <!-- Dialogs -->
                    <SolidColorBrush x:Key="AppDialogBackground"         Color="#FFFFFF"/>
                    <SolidColorBrush x:Key="AppDialogPanelBackground"    Color="#F9F9F9"/>
                    <SolidColorBrush x:Key="AppDialogSubtleBackground"   Color="#EEEEEE"/>
                    <SolidColorBrush x:Key="AppDialogDarkBackground"     Color="#EEEEEE"/>
                    <SolidColorBrush x:Key="ScreenshotLetterboxBackground" Color="#202020"/>
                    <SolidColorBrush x:Key="SmokeFillColorDefaultBrush" Color="#4D000000"/>
                    <!-- Warning banner -->
                    <SolidColorBrush x:Key="WarningBannerBackground"     Color="#FFF4CE"/>
                    <SolidColorBrush x:Key="WarningBannerBorderBrush"    Color="#9D5D00"/>
                    <SolidColorBrush x:Key="WarningBannerIconBackground" Color="#9D5D00"/>
                    <SolidColorBrush x:Key="WarningBannerIconForeground" Color="#FFFFFF"/>
                    <SolidColorBrush x:Key="WarningBannerSubtext"        Color="#9D5D00"/>
                    <!-- Status banners (success / error / info) -->
                    <SolidColorBrush x:Key="StatusSuccessBackground"     Color="#DFF6DD"/>
                    <SolidColorBrush x:Key="StatusSuccessBorderBrush"    Color="#0F7B0F"/>
                    <SolidColorBrush x:Key="StatusErrorBackground"       Color="#FDE7E9"/>
                    <SolidColorBrush x:Key="StatusErrorBorderBrush"      Color="#C42B1C"/>
                    <SolidColorBrush x:Key="StatusInfoBackground"        Color="#E5F1FA"/>
                    <SolidColorBrush x:Key="StatusInfoBorderBrush"       Color="{DynamicResource SystemAccentColor}"/>
                    <!-- Status badge foreground -->
                    <SolidColorBrush x:Key="StatusSuccessForeground"     Color="#0F7B0F"/>
                    <SolidColorBrush x:Key="StatusWarningForeground"     Color="#9D5D00"/>
                    <SolidColorBrush x:Key="StatusErrorForeground"       Color="#C42B1C"/>
                    <!-- Setting warning subtext -->
                    <SolidColorBrush x:Key="SettingWarningTextForeground" Color="#9D5D00"/>
                    <!-- Operation log output text -->
                    <SolidColorBrush x:Key="LogOutputVerboseForeground"   Color="#5C5C5C"/>
                    <!-- Toast: failure-badge red and drop shadow (light) -->
                    <SolidColorBrush x:Key="ToastBadgeBrush"              Color="#C42B1C"/>
                    <BoxShadows x:Key="ToastShadow">0 4 16 0 #33000000</BoxShadows>
                </ResourceDictionary>
                <ResourceDictionary x:Key="Dark">
                    <!-- Accent fills (lighter accents on dark bg) -->
                    <SolidColorBrush x:Key="AccentFillColorDefaultBrush"   Color="{DynamicResource SystemAccentColorLight2}"/>
                    <SolidColorBrush x:Key="AccentFillColorSecondaryBrush" Color="{DynamicResource SystemAccentColorLight1}"/>
                    <SolidColorBrush x:Key="AccentFillColorTertiaryBrush"  Color="{DynamicResource SystemAccentColor}"/>
                    <SolidColorBrush x:Key="AccentFillColorDisabledBrush"  Color="#28FFFFFF"/>
                    <SolidColorBrush x:Key="AccentFillColorSelectedTextBackgroundBrush" Color="{DynamicResource SystemAccentColor}"/>
                    <!-- Subtle fills (WinUI NavigationViewItem hover/selected backgrounds) -->
                    <SolidColorBrush x:Key="SubtleFillColorSecondaryBrush" Color="#0FFFFFFF"/>
                    <SolidColorBrush x:Key="SubtleFillColorTertiaryBrush"  Color="#0AFFFFFF"/>
                    <!-- Accent text -->
                    <SolidColorBrush x:Key="AccentTextFillColorPrimaryBrush"   Color="{DynamicResource SystemAccentColorLight3}"/>
                    <SolidColorBrush x:Key="AccentTextFillColorSecondaryBrush" Color="{DynamicResource SystemAccentColorLight3}"/>
                    <SolidColorBrush x:Key="AccentTextFillColorTertiaryBrush"  Color="{DynamicResource SystemAccentColorLight2}"/>
                    <SolidColorBrush x:Key="AccentTextFillColorDisabledBrush"  Color="#5CFFFFFF"/>
                    <SolidColorBrush x:Key="HyperlinkForeground"               Color="#A6D4FF"/>
                    <!-- Text fill -->
                    <SolidColorBrush x:Key="TextFillColorPrimaryBrush"   Color="#FFFFFFFF"/>
                    <SolidColorBrush x:Key="TextFillColorSecondaryBrush" Color="#C5FFFFFF"/>
                    <SolidColorBrush x:Key="TextFillColorTertiaryBrush"  Color="#87FFFFFF"/>
                    <!-- Search-box placeholders. Dark theme keeps the brighter value that matched WinUI; both fields
                         share it since thick-stroke heaviness only reads as darker on light backgrounds. -->
                    <SolidColorBrush x:Key="SearchBoxPlaceholderForeground"   Color="#C5FFFFFF"/>
                    <SolidColorBrush x:Key="MegaQueryPlaceholderForeground"   Color="#C5FFFFFF"/>
                    <SolidColorBrush x:Key="SearchBoxInactiveBackground"      Color="#0FFFFFFF"/>
                    <SolidColorBrush x:Key="SearchBoxFocusedBackground"       Color="#B31E1E1E"/>
                    <SolidColorBrush x:Key="SearchBoxFocusedBorderBrush"      Color="#12FFFFFF"/>
                    <SolidColorBrush x:Key="TextFillColorDisabledBrush"  Color="#5DFFFFFF"/>
                    <SolidColorBrush x:Key="TextFillColorInverseBrush"   Color="#E4000000"/>
                    <!-- WinUI's dark flyout surface is an opaque #2C2C2C. -->
                    <SolidColorBrush x:Key="MenuSurfaceBrush"            Color="#FF2C2C2C"/>
                    <SolidColorBrush x:Key="MenuSurfaceBorderBrush"      Color="#26FFFFFF"/>
                    <SolidColorBrush x:Key="MenuDividerBrush"            Color="#15FFFFFF"/>
                    <!-- Text on accent -->
                    <SolidColorBrush x:Key="TextOnAccentFillColorPrimaryBrush"      Color="#000000"/>
                    <SolidColorBrush x:Key="TextOnAccentFillColorSecondaryBrush"    Color="#80000000"/>
                    <SolidColorBrush x:Key="TextOnAccentFillColorDisabledBrush"     Color="#87FFFFFF"/>
                    <SolidColorBrush x:Key="TextOnAccentFillColorSelectedTextBrush" Color="#FFFFFFFF"/>
                    <!-- Settings cards -->
                    <SolidColorBrush x:Key="SettingsCardBackground"      Color="#0DFFFFFF"/>
                    <SolidColorBrush x:Key="SettingsCardBorderBrush"     Color="#393939"/>
                    <SolidColorBrush x:Key="SettingsCardHoverBackground" Color="#323232"/>
                    <!-- WinUI dropdown controls use the same control/card fill as settings actions. -->
                    <StaticResource x:Key="ComboBoxBackground" ResourceKey="SettingsCardBackground"/>
                    <StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SettingsCardBackground"/>
                    <StaticResource x:Key="ComboBoxBackgroundPointerOver" ResourceKey="SettingsCardHoverBackground"/>
                    <StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SettingsCardHoverBackground"/>
                    <SolidColorBrush x:Key="ComboBoxBorderBrush" Color="Transparent"/>
                    <SolidColorBrush x:Key="ComboBoxBackgroundBorderBrushUnfocused" Color="Transparent"/>
                    <SolidColorBrush x:Key="ComboBoxBorderBrushPointerOver" Color="Transparent"/>
                    <SolidColorBrush x:Key="ComboBoxBorderBrushPressed" Color="Transparent"/>
                    <!-- Package list container; near-transparent over Mica (see Styles.WindowsMica) -->
                    <SolidColorBrush x:Key="PackageListBackground"       Color="#2D2D2D"/>
                    <!-- Column header: WinUI default button (ControlFillColorDefault fill + ControlStrokeColorDefault border) -->
                    <SolidColorBrush x:Key="PackageListHeaderBackground" Color="#0FFFFFFF"/>
                    <SolidColorBrush x:Key="PackageListHeaderBorderBrush" Color="#12FFFFFF"/>
                    <!-- Subtle header hover/press (WinUI-style), over the rest fill -->
                    <SolidColorBrush x:Key="DataGridColumnHeaderHoveredBackgroundBrush" Color="#0AFFFFFF"/>
                    <SolidColorBrush x:Key="DataGridColumnHeaderPressedBackgroundBrush" Color="#1FFFFFFF"/>
                    <!-- Window structure -->
                    <SolidColorBrush x:Key="AppWindowBackground"         Color="#202020"/>
                    <SolidColorBrush x:Key="AppTitleBarBackground"       Color="#202020"/>
                    <!-- Window/page surface; overridden to Transparent by Styles.WindowsMica when Mica is active -->
                    <SolidColorBrush x:Key="MicaPageBackground"          Color="#202020"/>
                    <SolidColorBrush x:Key="AppSplitterBackground"       Color="#1A1A1A"/>
                    <SolidColorBrush x:Key="AppOperationsPanelBackground" Color="#1C1C1C"/>
                    <SolidColorBrush x:Key="AppBorderBrush"              Color="#353535"/>
                    <SolidColorBrush x:Key="AppBadgeBackground"          Color="#3C3C3C"/>
                    <!-- Dialogs -->
                    <SolidColorBrush x:Key="AppDialogBackground"         Color="#2C2C2C"/>
                    <SolidColorBrush x:Key="AppDialogPanelBackground"    Color="#2C2C2C"/>
                    <SolidColorBrush x:Key="AppDialogSubtleBackground"   Color="#393939"/>
                    <SolidColorBrush x:Key="AppDialogDarkBackground"     Color="#1A1A1A"/>
                    <SolidColorBrush x:Key="ScreenshotLetterboxBackground" Color="#202020"/>
                    <SolidColorBrush x:Key="SmokeFillColorDefaultBrush" Color="#4D000000"/>
                    <!-- Warning banner -->
                    <SolidColorBrush x:Key="WarningBannerBackground"     Color="#433519"/>
                    <SolidColorBrush x:Key="WarningBannerBorderBrush"    Color="#A07208"/>
                    <SolidColorBrush x:Key="WarningBannerIconBackground" Color="#FCE100"/>
                    <SolidColorBrush x:Key="WarningBannerIconForeground" Color="#1a1000"/>
                    <SolidColorBrush x:Key="WarningBannerSubtext"        Color="#FCE100"/>
                    <!-- Status banners (success / error / info) -->
                    <SolidColorBrush x:Key="StatusSuccessBackground"     Color="#393D1B"/>
                    <SolidColorBrush x:Key="StatusSuccessBorderBrush"    Color="#4F7B27"/>
                    <SolidColorBrush x:Key="StatusErrorBackground"       Color="#442726"/>
                    <SolidColorBrush x:Key="StatusErrorBorderBrush"      Color="#8B4A48"/>
                    <SolidColorBrush x:Key="StatusInfoBackground"        Color="#1B2A35"/>
                    <SolidColorBrush x:Key="StatusInfoBorderBrush"       Color="#2E4756"/>
                    <!-- Status badge foreground -->
                    <SolidColorBrush x:Key="StatusSuccessForeground"     Color="#6CCB5F"/>
                    <SolidColorBrush x:Key="StatusWarningForeground"     Color="#FCE100"/>
                    <SolidColorBrush x:Key="StatusErrorForeground"       Color="#FF99A4"/>
                    <!-- Setting warning subtext -->
                    <SolidColorBrush x:Key="SettingWarningTextForeground" Color="#FCE100"/>
                    <!-- Operation log output text -->
                    <SolidColorBrush x:Key="LogOutputVerboseForeground"   Color="#9D9D9D"/>
                    <!-- Toast: failure-badge red and drop shadow (dark) -->
                    <SolidColorBrush x:Key="ToastBadgeBrush"              Color="#FF5449"/>
                    <BoxShadows x:Key="ToastShadow">0 4 18 0 #80000000</BoxShadows>
                </ResourceDictionary>
            </ResourceDictionary.ThemeDictionaries>
        </ResourceDictionary>
    </Styles.Resources>

    <StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>

    <!-- DataGrid selection: WinUI-style border-only. Permanent transparent border reserves layout
         space so adjacent rows don't shift on select and the accent border isn't clipped on first/last rows. -->
    <Style Selector="DataGridRow">
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
    </Style>
    <!-- Column headers default to Avalonia's 12px bare-TextBlock size; WinUI renders them at 14px. -->
    <Style Selector="DataGridColumnHeader">
        <Setter Property="FontSize" Value="14"/>
    </Style>

    <!-- WinUI-style menu geometry. Insetting each item keeps its hover fill away from the
         flyout edge, while separators deliberately span the presenter's usable width. -->
    <Style Selector="MenuFlyoutPresenter">
        <Setter Property="Background" Value="{DynamicResource MenuSurfaceBrush}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource MenuSurfaceBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0,4"/>
    </Style>
    <Style Selector="MenuFlyoutPresenter MenuItem">
        <Setter Property="Margin" Value="4,0"/>
        <Setter Property="Padding" Value="8,4,8,5"/>
        <Setter Property="MinHeight" Value="32"/>
        <Setter Property="CornerRadius" Value="4"/>
    </Style>
    <Style Selector="MenuFlyoutPresenter Separator">
        <Setter Property="Margin" Value="0,4"/>
        <Setter Property="Background" Value="{DynamicResource MenuDividerBrush}"/>
    </Style>
    <Style Selector="ContextMenu">
        <Setter Property="Background" Value="{DynamicResource MenuSurfaceBrush}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource MenuSurfaceBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0,4"/>
    </Style>
    <Style Selector="ContextMenu MenuItem">
        <Setter Property="Margin" Value="4,0"/>
        <Setter Property="Padding" Value="8,4,8,5"/>
        <Setter Property="MinHeight" Value="32"/>
        <Setter Property="CornerRadius" Value="4"/>
    </Style>
    <Style Selector="ContextMenu MenuItem /template/ ContentPresenter#PART_HeaderPresenter">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    <Style Selector="ContextMenu Separator">
        <Setter Property="Margin" Value="0,4"/>
        <Setter Property="Background" Value="{DynamicResource MenuDividerBrush}"/>
    </Style>
    <Style Selector="DataGridRow:selected">
        <Setter Property="BorderBrush" Value="{DynamicResource SystemAccentColor}"/>
    </Style>
    <Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
        <Setter Property="Fill" Value="Transparent"/>
    </Style>
    <Style Selector="DataGridRow:selected:pointerover /template/ Rectangle#BackgroundRectangle">
        <Setter Property="Fill" Value="{DynamicResource SettingsCardHoverBackground}"/>
    </Style>

    <!-- Sidebar navigation items: WinUI NavigationViewItem-style selection.
         The accent pill is a single moving overlay owned by SidebarView. The content presenter is
         named ContentHost (not PART_ContentPresenter) so the base theme's accent-fill setters don't
         apply. -->
    <Style Selector="ListBoxItem.nav-item">
        <Setter Property="Margin" Value="0,2"/>
        <Setter Property="Template">
            <ControlTemplate>
                <ContentPresenter Name="ContentHost"
                                  Background="{TemplateBinding Background}"
                                  BorderBrush="{TemplateBinding BorderBrush}"
                                  BorderThickness="{TemplateBinding BorderThickness}"
                                  CornerRadius="{TemplateBinding CornerRadius}"
                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                  Content="{TemplateBinding Content}"
                                  Padding="{TemplateBinding Padding}"
                                  VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            </ControlTemplate>
        </Setter>
    </Style>
    <Style Selector="ListBoxItem.nav-item:pointerover /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorSecondaryBrush}"/>
    </Style>
    <Style Selector="ListBoxItem.nav-item:pressed /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}"/>
    </Style>
    <Style Selector="ListBoxItem.nav-item:selected /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorSecondaryBrush}"/>
    </Style>
    <Style Selector="ListBoxItem.nav-item:selected:pointerover /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}"/>
    </Style>
    <!-- View-mode segmented selector (List / Grid / Icons): WinUI Segmented-style selection — subtle
         fill plus an accent underline under the selected segment, not Fluent's full-accent fill. -->
    <Style Selector="ListBoxItem.segment-item">
        <Setter Property="Template">
            <ControlTemplate>
                <Panel>
                    <ContentPresenter Name="ContentHost"
                                      Background="{TemplateBinding Background}"
                                      BorderBrush="{TemplateBinding BorderBrush}"
                                      BorderThickness="{TemplateBinding BorderThickness}"
                                      CornerRadius="{TemplateBinding CornerRadius}"
                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                      Content="{TemplateBinding Content}"
                                      Padding="{TemplateBinding Padding}"
                                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                      HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                    <Border Name="SelectionPill"
                            Width="16" Height="3" CornerRadius="1.5"
                            Background="{DynamicResource AccentFillColorDefaultBrush}"
                            HorizontalAlignment="Center" VerticalAlignment="Bottom"
                            Margin="0,0,0,2"
                            Opacity="0">
                        <Border.Transitions>
                            <Transitions><DoubleTransition Property="Opacity" Duration="0:0:0.1"/></Transitions>
                        </Border.Transitions>
                    </Border>
                </Panel>
            </ControlTemplate>
        </Setter>
    </Style>
    <Style Selector="ListBoxItem.segment-item:pointerover /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorSecondaryBrush}"/>
    </Style>
    <Style Selector="ListBoxItem.segment-item:selected /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorSecondaryBrush}"/>
    </Style>
    <Style Selector="ListBoxItem.segment-item:selected:pointerover /template/ ContentPresenter#ContentHost">
        <Setter Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}"/>
    </Style>
    <Style Selector="ListBoxItem.segment-item:selected /template/ Border#SelectionPill">
        <Setter Property="Opacity" Value="1"/>
    </Style>

    <!-- SettingsCard appearance -->
    <Style Selector="Border.settings-card">
        <Setter Property="Background"   Value="{DynamicResource SettingsCardBackground}"/>
        <Setter Property="BorderBrush"  Value="{DynamicResource SettingsCardBorderBrush}"/>
        <Setter Property="Margin"       Value="40,0"/>
    </Style>
    <Style Selector="Border.settings-card-clickable:pointerover">
        <Setter Property="Background"   Value="{DynamicResource SettingsCardHoverBackground}"/>
    </Style>
    <Style Selector="Border.settings-card-focused">
        <Setter Property="BorderBrush"     Value="{DynamicResource SystemAccentColor}"/>
        <Setter Property="BorderThickness" Value="2"/>
    </Style>

    <!-- Setting warning subtext (amber, both themes) -->
    <Style Selector="TextBlock.setting-warning-text">
        <Setter Property="Foreground" Value="{DynamicResource SettingWarningTextForeground}"/>
    </Style>

    <!-- Warning banner (InfoBar-style amber/golden) -->
    <Style Selector="Border.warning-banner">
        <Setter Property="Background"      Value="{DynamicResource WarningBannerBackground}"/>
        <Setter Property="BorderBrush"     Value="{DynamicResource WarningBannerBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin"          Value="40,4,40,0"/>
    </Style>

    <!-- Hyperlink-style text (blue accent, underline) -->
    <Style Selector="TextBlock.hyperlink">
        <Setter Property="Foreground"       Value="{DynamicResource SystemControlHighlightAccentBrush}"/>
        <Setter Property="TextDecorations"  Value="Underline"/>
        <Setter Property="Cursor"           Value="Hand"/>
    </Style>

    <!-- SvgIcon: inherit the Fluent foreground so icons match text colour in both themes -->
    <Style Selector="controls|SvgIcon">
        <Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
    </Style>

    <!-- Filters toolbar toggle: card-like fill (matches SettingsCard) when checked -->
    <Style Selector="ToggleButton.filter-toggle">
        <Style.Resources>
            <ResourceDictionary>
                <ResourceDictionary.ThemeDictionaries>
                    <ResourceDictionary x:Key="Light">
                        <SolidColorBrush x:Key="ToggleButtonBackgroundChecked"             Color="#FBFBFB"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPointerOver"  Color="#F6F6F6"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPressed"      Color="#EDEDED"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedDisabled"     Color="#FBFBFB"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushChecked"            Color="#ECECEC"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPointerOver" Color="#ECECEC"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPressed"     Color="#ECECEC"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedDisabled"    Color="#ECECEC"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundChecked"             Color="Black"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPointerOver"  Color="Black"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPressed"      Color="Black"/>
                    </ResourceDictionary>
                    <ResourceDictionary x:Key="Dark">
                        <SolidColorBrush x:Key="ToggleButtonBackgroundChecked"             Color="#2D2D2D"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPointerOver"  Color="#323232"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPressed"      Color="#3C3C3C"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedDisabled"     Color="#2D2D2D"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushChecked"            Color="#393939"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPointerOver" Color="#393939"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPressed"     Color="#393939"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedDisabled"    Color="#393939"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundChecked"             Color="White"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPointerOver"  Color="White"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPressed"      Color="White"/>
                    </ResourceDictionary>
                </ResourceDictionary.ThemeDictionaries>
            </ResourceDictionary>
        </Style.Resources>
    </Style>

    <!-- Source-tree expand chevron: transparent background, subtle overlay on hover/press -->
    <Style Selector="ToggleButton.tree-chevron">
        <Style.Resources>
            <ResourceDictionary>
                <ResourceDictionary.ThemeDictionaries>
                    <ResourceDictionary x:Key="Light">
                        <SolidColorBrush x:Key="ToggleButtonBackground"                    Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundPointerOver"         Color="#0F000000"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundPressed"             Color="#1A000000"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundChecked"             Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPointerOver"  Color="#0F000000"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPressed"      Color="#1A000000"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrush"                   Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushPointerOver"        Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushPressed"            Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushChecked"            Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPointerOver" Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPressed"     Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundChecked"             Color="Black"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPointerOver"  Color="Black"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPressed"      Color="Black"/>
                    </ResourceDictionary>
                    <ResourceDictionary x:Key="Dark">
                        <SolidColorBrush x:Key="ToggleButtonBackground"                    Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundPointerOver"         Color="#15FFFFFF"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundPressed"             Color="#20FFFFFF"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundChecked"             Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPointerOver"  Color="#15FFFFFF"/>
                        <SolidColorBrush x:Key="ToggleButtonBackgroundCheckedPressed"      Color="#20FFFFFF"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrush"                   Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushPointerOver"        Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushPressed"            Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushChecked"            Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPointerOver" Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonBorderBrushCheckedPressed"     Color="Transparent"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundChecked"             Color="White"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPointerOver"  Color="White"/>
                        <SolidColorBrush x:Key="ToggleButtonForegroundCheckedPressed"      Color="White"/>
                    </ResourceDictionary>
                </ResourceDictionary.ThemeDictionaries>
            </ResourceDictionary>
        </Style.Resources>
    </Style>

</Styles>
