<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!--
        TeamsISO design tokens — Wild Dragon brand × redesigned IA.

        Color tokens live inside ResourceDictionary.ThemeDictionaries so
        {ThemeResource} consumers swap automatically when RequestedTheme
        flips (no app restart, no flicker). Brushes are paired per theme
        because Color resolution is theme-scoped.

        Spacing, radii, and typography tokens are theme-agnostic and live
        at the top level.

        Token naming mirrors DESIGN.md. The dark palette is the canonical
        reference; the light palette inverts the value scale while
        preserving brand recognition (cyan-tinted off-whites, not pure
        white surfaces).
    -->

    <ResourceDictionary.ThemeDictionaries>

        <!-- ════════════ DARK ════════════ -->
        <ResourceDictionary x:Key="Default">

            <!-- Surfaces -->
            <Color x:Key="BgCanvasColor">#FF0A0A0A</Color>
            <Color x:Key="BgRailColor">#FF080808</Color>
            <Color x:Key="BgSurfaceColor">#FF141416</Color>
            <Color x:Key="BgElevatedColor">#FF1C1C1F</Color>
            <Color x:Key="BgHoverColor">#FF26272B</Color>
            <Color x:Key="BgActiveColor">#FF33343A</Color>

            <!-- Borders -->
            <Color x:Key="BorderSubtleColor">#FF26272B</Color>
            <Color x:Key="BorderStrongColor">#FF3A3B40</Color>

            <!-- Text -->
            <Color x:Key="FgPrimaryColor">#FFF4F4F6</Color>
            <Color x:Key="FgSecondaryColor">#FFA3A4AA</Color>
            <Color x:Key="FgTertiaryColor">#FF6B6C72</Color>
            <Color x:Key="FgDisabledColor">#FF404145</Color>
            <Color x:Key="FgOnAccentColor">#FF0A0A0A</Color>

            <!-- Accents (context-aware) -->
            <Color x:Key="AccentCyanSurfaceColor">#FF97EDF0</Color>
            <Color x:Key="AccentCyanTextColor">#FF97EDF0</Color>
            <Color x:Key="AccentCyanHoverColor">#FFB5F2F4</Color>
            <Color x:Key="AccentCyanMutedColor">#FF1B3537</Color>

            <Color x:Key="AccentCoralColor">#FFFB819C</Color>
            <Color x:Key="AccentCoralBgColor">#FF3A1922</Color>

            <Color x:Key="StatusLiveColor">#FF4ADE80</Color>
            <Color x:Key="StatusLiveBgColor">#FF13261A</Color>
            <Color x:Key="StatusWarnColor">#FFFBBF24</Color>
            <Color x:Key="StatusWarnBgColor">#FF3A2E12</Color>

            <!-- Brushes — one per Color, used by consumers via {ThemeResource} -->
            <SolidColorBrush x:Key="BgCanvas" Color="{ThemeResource BgCanvasColor}"/>
            <SolidColorBrush x:Key="BgRail" Color="{ThemeResource BgRailColor}"/>
            <SolidColorBrush x:Key="BgSurface" Color="{ThemeResource BgSurfaceColor}"/>
            <SolidColorBrush x:Key="BgElevated" Color="{ThemeResource BgElevatedColor}"/>
            <SolidColorBrush x:Key="BgHover" Color="{ThemeResource BgHoverColor}"/>
            <SolidColorBrush x:Key="BgActive" Color="{ThemeResource BgActiveColor}"/>

            <SolidColorBrush x:Key="BorderSubtle" Color="{ThemeResource BorderSubtleColor}"/>
            <SolidColorBrush x:Key="BorderStrong" Color="{ThemeResource BorderStrongColor}"/>

            <SolidColorBrush x:Key="FgPrimary" Color="{ThemeResource FgPrimaryColor}"/>
            <SolidColorBrush x:Key="FgSecondary" Color="{ThemeResource FgSecondaryColor}"/>
            <SolidColorBrush x:Key="FgTertiary" Color="{ThemeResource FgTertiaryColor}"/>
            <SolidColorBrush x:Key="FgDisabled" Color="{ThemeResource FgDisabledColor}"/>
            <SolidColorBrush x:Key="FgOnAccent" Color="{ThemeResource FgOnAccentColor}"/>

            <SolidColorBrush x:Key="AccentCyanSurface" Color="{ThemeResource AccentCyanSurfaceColor}"/>
            <SolidColorBrush x:Key="AccentCyanText" Color="{ThemeResource AccentCyanTextColor}"/>
            <SolidColorBrush x:Key="AccentCyanHover" Color="{ThemeResource AccentCyanHoverColor}"/>
            <SolidColorBrush x:Key="AccentCyanMuted" Color="{ThemeResource AccentCyanMutedColor}"/>

            <SolidColorBrush x:Key="AccentCoral" Color="{ThemeResource AccentCoralColor}"/>
            <SolidColorBrush x:Key="AccentCoralBg" Color="{ThemeResource AccentCoralBgColor}"/>

            <SolidColorBrush x:Key="StatusLive" Color="{ThemeResource StatusLiveColor}"/>
            <SolidColorBrush x:Key="StatusLiveBg" Color="{ThemeResource StatusLiveBgColor}"/>
            <SolidColorBrush x:Key="StatusWarn" Color="{ThemeResource StatusWarnColor}"/>
            <SolidColorBrush x:Key="StatusWarnBg" Color="{ThemeResource StatusWarnBgColor}"/>

        </ResourceDictionary>

        <!-- ════════════ LIGHT ════════════ -->
        <ResourceDictionary x:Key="Light">

            <!-- Surfaces — cyan-tinted off-whites; not pure white -->
            <Color x:Key="BgCanvasColor">#FFFAFAFB</Color>
            <Color x:Key="BgRailColor">#FFF0F1F3</Color>
            <Color x:Key="BgSurfaceColor">#FFFFFFFF</Color>
            <Color x:Key="BgElevatedColor">#FFFFFFFF</Color>
            <Color x:Key="BgHoverColor">#FFECEEF1</Color>
            <Color x:Key="BgActiveColor">#FFE0E3E7</Color>

            <!-- Borders -->
            <Color x:Key="BorderSubtleColor">#FFE5E7EB</Color>
            <Color x:Key="BorderStrongColor">#FFD1D5DA</Color>

            <!-- Text -->
            <Color x:Key="FgPrimaryColor">#FF0A0A0A</Color>
            <Color x:Key="FgSecondaryColor">#FF4A4B50</Color>
            <Color x:Key="FgTertiaryColor">#FF71747A</Color>
            <Color x:Key="FgDisabledColor">#FFB3B6BC</Color>
            <Color x:Key="FgOnAccentColor">#FF0A0A0A</Color>

            <!-- Accents — surface fill stays bright cyan; text variant darkens for AA -->
            <Color x:Key="AccentCyanSurfaceColor">#FF97EDF0</Color>
            <Color x:Key="AccentCyanTextColor">#FF0E7C82</Color>
            <Color x:Key="AccentCyanHoverColor">#FF0890A0</Color>
            <Color x:Key="AccentCyanMutedColor">#FFE6F8F9</Color>

            <Color x:Key="AccentCoralColor">#FFD43E5C</Color>
            <Color x:Key="AccentCoralBgColor">#FFFDECF0</Color>

            <Color x:Key="StatusLiveColor">#FF15803D</Color>
            <Color x:Key="StatusLiveBgColor">#FFDCFCE7</Color>
            <Color x:Key="StatusWarnColor">#FFB45309</Color>
            <Color x:Key="StatusWarnBgColor">#FFFEF3C7</Color>

            <SolidColorBrush x:Key="BgCanvas" Color="{ThemeResource BgCanvasColor}"/>
            <SolidColorBrush x:Key="BgRail" Color="{ThemeResource BgRailColor}"/>
            <SolidColorBrush x:Key="BgSurface" Color="{ThemeResource BgSurfaceColor}"/>
            <SolidColorBrush x:Key="BgElevated" Color="{ThemeResource BgElevatedColor}"/>
            <SolidColorBrush x:Key="BgHover" Color="{ThemeResource BgHoverColor}"/>
            <SolidColorBrush x:Key="BgActive" Color="{ThemeResource BgActiveColor}"/>

            <SolidColorBrush x:Key="BorderSubtle" Color="{ThemeResource BorderSubtleColor}"/>
            <SolidColorBrush x:Key="BorderStrong" Color="{ThemeResource BorderStrongColor}"/>

            <SolidColorBrush x:Key="FgPrimary" Color="{ThemeResource FgPrimaryColor}"/>
            <SolidColorBrush x:Key="FgSecondary" Color="{ThemeResource FgSecondaryColor}"/>
            <SolidColorBrush x:Key="FgTertiary" Color="{ThemeResource FgTertiaryColor}"/>
            <SolidColorBrush x:Key="FgDisabled" Color="{ThemeResource FgDisabledColor}"/>
            <SolidColorBrush x:Key="FgOnAccent" Color="{ThemeResource FgOnAccentColor}"/>

            <SolidColorBrush x:Key="AccentCyanSurface" Color="{ThemeResource AccentCyanSurfaceColor}"/>
            <SolidColorBrush x:Key="AccentCyanText" Color="{ThemeResource AccentCyanTextColor}"/>
            <SolidColorBrush x:Key="AccentCyanHover" Color="{ThemeResource AccentCyanHoverColor}"/>
            <SolidColorBrush x:Key="AccentCyanMuted" Color="{ThemeResource AccentCyanMutedColor}"/>

            <SolidColorBrush x:Key="AccentCoral" Color="{ThemeResource AccentCoralColor}"/>
            <SolidColorBrush x:Key="AccentCoralBg" Color="{ThemeResource AccentCoralBgColor}"/>

            <SolidColorBrush x:Key="StatusLive" Color="{ThemeResource StatusLiveColor}"/>
            <SolidColorBrush x:Key="StatusLiveBg" Color="{ThemeResource StatusLiveBgColor}"/>
            <SolidColorBrush x:Key="StatusWarn" Color="{ThemeResource StatusWarnColor}"/>
            <SolidColorBrush x:Key="StatusWarnBg" Color="{ThemeResource StatusWarnBgColor}"/>

        </ResourceDictionary>

    </ResourceDictionary.ThemeDictionaries>

    <!-- ════════════ SPACING (8px grid) — theme-agnostic ════════════ -->
    <x:Double x:Key="SpaceXS">4</x:Double>
    <x:Double x:Key="SpaceS">8</x:Double>
    <x:Double x:Key="SpaceM">12</x:Double>
    <x:Double x:Key="SpaceL">16</x:Double>
    <x:Double x:Key="SpaceXL">24</x:Double>
    <x:Double x:Key="SpaceXXL">32</x:Double>
    <x:Double x:Key="SpaceXXXL">48</x:Double>

    <!-- ════════════ RADII ════════════ -->
    <CornerRadius x:Key="RadiusS">6</CornerRadius>
    <CornerRadius x:Key="RadiusM">8</CornerRadius>
    <CornerRadius x:Key="RadiusL">12</CornerRadius>
    <CornerRadius x:Key="RadiusPill">999</CornerRadius>

    <!-- ════════════ TYPOGRAPHY ════════════ -->
    <!--
        WinUI 3 font URIs use ms-appx, not WPF's pack://. The "#Inter" suffix
        is the font's family name as declared in the .ttf's name table —
        without it, the font loads as a generic font and falls back to the
        system default.
    -->
    <FontFamily x:Key="FontSans">ms-appx:///Assets/Fonts/Inter.ttf#Inter</FontFamily>
    <FontFamily x:Key="FontMono">ms-appx:///Assets/Fonts/JetBrainsMono.ttf#JetBrains Mono</FontFamily>

    <x:Double x:Key="TextDisplaySize">22</x:Double>
    <x:Double x:Key="TextTitleSize">18</x:Double>
    <x:Double x:Key="TextHeadingSize">14</x:Double>
    <x:Double x:Key="TextBodySize">13</x:Double>
    <x:Double x:Key="TextCaptionSize">11</x:Double>
    <x:Double x:Key="TextMonoSize">12</x:Double>

</ResourceDictionary>
