-- ============================================================================
-- Housing Decor Guide - SchemeConstants
-- Color scheme definitions for theming
-- Uses shared VAMOOSE_SchemeConstants if available, otherwise defines locally
-- ============================================================================

local addonName, privateDB = ...

-- Use the addon's global namespace (created in HDG_Core.lua)
local HDG = _G.HousingDecorGuide

HDG.Colors = HDG.Colors or {}

-- Theme cycle order
HDG.Colors.ThemeOrder = {
    "HDGDefault",
    "SolarizedDark",
    "SolarizedLight",
    "GruvboxDark",
    "GruvboxLight",
    "EverforestDark",
    "EverforestLight",
    "EverforestAccess",
    "KanagawaDark",
    "KanagawaLight",
    "AccessibilityHC",
    "ColorblindSafe",
    "HousingTheme",
}

HDG.Colors.ThemeNames = {
    HDGDefault = "HDG Default",
    SolarizedDark = "Solarized Dark",
    SolarizedLight = "Solarized Light",
    GruvboxDark = "Gruvbox Dark",
    GruvboxLight = "Gruvbox Light",
    EverforestDark = "Everforest Dark",
    EverforestLight = "Everforest Light",
    EverforestAccess = "Everforest Access",
    KanagawaDark = "Kanagawa Dark",
    KanagawaLight = "Kanagawa Light",
    AccessibilityHC = "Accessibility HC",
    ColorblindSafe = "Colorblind Safe",
    HousingTheme = "Housing Theme",
}

-- Font families available (Expressway default, others for locale/style)
HDG.Colors.FontOrder = { "Expressway", "FRIZQT__", "ARIALN", "skurri", "MORPHEUS", "GameDefault" }
HDG.Colors.FontDisplayNames = {
    ARIALN = "Arial Narrow",
    FRIZQT__ = "Friz Quadrata",
    skurri = "Skurri",
    MORPHEUS = "Morpheus",
    Expressway = "Expressway",
    GameDefault = "WoW Default (" .. GetLocale() .. ")",
}
HDG.Colors.FontFiles = {
    ARIALN = "Fonts\\ARIALN.TTF",
    FRIZQT__ = "Fonts\\FRIZQT__.TTF",
    skurri = "Fonts\\skurri.TTF",
    MORPHEUS = "Fonts\\MORPHEUS.TTF",
    Expressway = "Interface\\AddOns\\HousingDecorGuide\\Fonts\\expressway.ttf",
    GameDefault = STANDARD_TEXT_FONT,  -- WoW's locale-appropriate font (Chinese/Korean/etc)
}

-- Non-Latin locales need fonts with proper character support
-- Cyrillic: ruRU, ukUA -> Friz Quadrata has Cyrillic glyphs
-- Asian: zhCN, zhTW, koKR -> Use WoW's STANDARD_TEXT_FONT (auto-mapped to regional font)
local NON_LATIN_LOCALES = {
    ruRU = "FRIZQT__",
    ukUA = "FRIZQT__",
    zhCN = "GameDefault",
    zhTW = "GameDefault",
    koKR = "GameDefault",
}
local DEFAULT_FONT = NON_LATIN_LOCALES[GetLocale()] or "Expressway"

-- Get current font family file path
function HDG.Colors.GetFontFile()
    local family = DEFAULT_FONT
    if HDG.Store and HDG.Store.state and HDG.Store.state.config then
        family = HDG.Store.state.config.fontFamily or DEFAULT_FONT
    elseif HDG_DB and HDG_DB.config and HDG_DB.config.fontFamily then
        family = HDG_DB.config.fontFamily
    end
    return HDG.Colors.FontFiles[family] or HDG.Colors.FontFiles[DEFAULT_FONT]
end

-- Define HDG schemes first, then merge shared schemes if available
-- This ensures HDGDefault is always available even when VE is loaded
HDG.Colors.Schemes = {

        -- ========================================================================
        -- HDG Default: Original dark slate theme with teal accents
        -- ========================================================================
        HDGDefault = {
            -- Dark theme
            -- Core colors
            bg           = {r=0.12, g=0.12, b=0.14, a=0.98},  -- Dark Slate (#1E1E24)
            panel        = {r=0.15, g=0.15, b=0.16, a=1.00},  -- Lighter Slate (#252526)
            panel_header = {r=0.20, g=0.20, b=0.22, a=1.00},  -- Panel header (lighter)
            border       = {r=0.29, g=0.33, b=0.41, a=1.00},  -- Slate Border (#4a5568)
            text         = {r=0.89, g=0.91, b=0.94, a=1.00},  -- Cool White (#e2e8f0)
            text_header  = {r=0.89, g=0.91, b=0.94, a=1.00},  -- Cool White (#e2e8f0)
            text_dim     = {r=0.53, g=0.53, b=0.53, a=1.00},  -- Muted Gray (#888888)
            text_flavor  = {r=0.85, g=0.70, b=0.30, a=0.90},  -- Warm Gold (#D9B34D)
            -- Button colors
            button_normal   = {r=0.15, g=0.15, b=0.16, a=1.00},
            button_hover    = {r=0.20, g=0.20, b=0.22, a=1.00},
            button_active   = {r=0.10, g=0.10, b=0.12, a=1.00},
            button_inactive = {r=0.15, g=0.15, b=0.16, a=0.40},
            button_text_norm  = {r=0.89, g=0.91, b=0.94, a=1.00},
            button_text_hover = {r=1.00, g=1.00, b=1.00, a=1.00},
            button_text_dis   = {r=0.40, g=0.40, b=0.40, a=1.00},
            -- Semantic colors
            accent       = {r=0.08, g=0.72, b=0.65, a=1.00},  -- Teal (#14b8a6)
            success      = {r=0.26, g=0.60, b=0.57, a=1.00},  -- Muted Teal dimmed 15% (#429A91)
            warning      = {r=0.99, g=0.83, b=0.30, a=1.00},  -- Gold (#fcd34d)
            error        = {r=1.00, g=0.00, b=0.00, a=1.00},  -- Red
            -- Teal accents (from PALETTE)
            teal_border        = {r=0.00, g=0.30, b=0.30, a=1.00},
            teal_border_bright = {r=0.00, g=0.50, b=0.50, a=1.00},
            teal_dark          = {r=0.11, g=0.31, b=0.31, a=1.00},  -- Active states (#1d4e4f)
            teal_hover         = {r=0.15, g=0.40, b=0.40, a=1.00},
            teal_button        = {r=0.08, g=0.45, b=0.42, a=1.00},
            teal_progress      = {r=0.18, g=0.80, b=0.44, a=1.00},
            teal_progress_full = {r=0.17, g=0.48, b=0.48, a=1.00},
            -- State colors
            state_active   = {r=0.11, g=0.31, b=0.31, a=1.00},
            state_inactive = {r=0.18, g=0.22, b=0.24, a=1.00},
            state_hover    = {r=0.22, g=0.28, b=0.30, a=1.00},
            -- Recipe list text colors
            text_recipe_known     = {r=1.00, g=0.82, b=0.00, a=1.00}, -- Known by current char (Gold)
            text_recipe_alt       = {r=1.00, g=1.00, b=1.00, a=1.00}, -- Known by alt (white)
            text_recipe_unknown   = {r=0.69, g=0.69, b=0.69, a=1.00}, -- Not known (#b0b0b0)
            text_recipe_no_prof   = {r=0.56, g=0.56, b=0.56, a=1.00}, -- No profession (#909090)
            -- Additional
            blue_known     = {r=0.37, g=0.67, b=0.86, a=1.00},  -- Known recipe (#5FABDC)
            tab_inactive   = {r=0.10, g=0.10, b=0.12, a=1.00},
            row_alt        = {r=0.12, g=0.12, b=0.15, a=0.60},  -- Alternating row
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Solarized Dark: "The IDE Look"
        -- High readability, low contrast fatigue.
        -- ========================================================================
        SolarizedDark = {
            -- Window & Containers
            bg           = {r=0.00, g=0.17, b=0.21, a=0.95}, -- Base03 (#002b36)
            panel        = {r=0.03, g=0.21, b=0.26, a=1.00}, -- Base02 (#073642)
            panel_header = {r=0.08, g=0.26, b=0.31, a=1.00}, -- Panel header (lighter)
            border       = {r=0.35, g=0.43, b=0.46, a=1.00}, -- Base01 (#586e75)

            -- Typography
            text         = {r=0.51, g=0.58, b=0.59, a=1.00}, -- Base0  (#839496)
            text_header  = {r=0.58, g=0.63, b=0.63, a=1.00}, -- Base1  (#93a1a1)
            text_dim     = {r=0.35, g=0.43, b=0.46, a=1.00}, -- Base01 (#586e75)
            text_flavor  = {r=0.71, g=0.54, b=0.00, a=0.90}, -- Yellow (#b58900)
            text_label   = {r=0.51, g=0.58, b=0.59, a=1.00}, -- Base0  (#839496) for Filter:/Tags:

            -- Interactive: Buttons & Inputs
            button_normal   = {r=0.03, g=0.21, b=0.26, a=1.00}, -- Base02 (#073642)
            button_hover    = {r=0.35, g=0.43, b=0.46, a=0.30}, -- Base01 (30% Opacity)
            button_active   = {r=0.00, g=0.17, b=0.21, a=1.00}, -- Base03 (Recedes into BG)
            button_inactive = {r=0.03, g=0.21, b=0.26, a=0.40}, -- Base02 (40% Opacity)

            -- Interactive Text Colors
            button_text_norm  = {r=0.58, g=0.63, b=0.63, a=1.00}, -- Base1
            button_text_hover = {r=0.99, g=0.96, b=0.89, a=1.00}, -- Base3 (Brightest White)
            button_text_dis   = {r=0.35, g=0.43, b=0.46, a=0.50}, -- Base01 (Dimmed)

            -- Semantics
            accent       = {r=0.15, g=0.55, b=0.82, a=1.00}, -- Blue (#268bd2)
            success      = {r=0.52, g=0.60, b=0.00, a=1.00}, -- Green (#859900)
            warning      = {r=0.71, g=0.54, b=0.00, a=1.00}, -- Yellow (#b58900)
            error        = {r=0.86, g=0.20, b=0.18, a=1.00}, -- Red (#dc322f)

            -- Goblin tab colors
            currency      = {r=0.71, g=0.54, b=0.00, a=1.00}, -- Solarized Yellow (#b58900) for gold values
            column_header = {r=0.35, g=0.43, b=0.46, a=1.00}, -- Base01 (#586e75) neutral headers

            -- State colors for toggle buttons
            state_active   = {r=0.03, g=0.35, b=0.38, a=1.00}, -- Cyan-teal active
            state_inactive = {r=0.03, g=0.21, b=0.26, a=1.00}, -- Panel color (Base02)
            state_hover    = {r=0.08, g=0.30, b=0.33, a=1.00}, -- Between active/inactive

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.58, g=0.63, b=0.63, a=1.00}, -- Known by alt (Base1)
            text_recipe_unknown   = {r=0.35, g=0.43, b=0.46, a=1.00}, -- Not known (Base01)
            text_recipe_no_prof   = {r=0.28, g=0.35, b=0.38, a=1.00}, -- No profession (darker)

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Solarized Light: "The Paper Look"
        -- Warm and bright, requires inversion of logic for buttons.
        -- ========================================================================
        SolarizedLight = {
            isLight      = true,
            -- Window & Containers
            bg           = {r=0.99, g=0.96, b=0.89, a=0.95}, -- Base3 (#fdf6e3)
            panel        = {r=0.93, g=0.91, b=0.84, a=1.00}, -- Base2 (#eee8d5)
            panel_header = {r=0.88, g=0.86, b=0.79, a=1.00}, -- Panel header (darker)
            border       = {r=0.58, g=0.63, b=0.63, a=0.50}, -- Base1 (Subtle border)

            -- Typography
            text         = {r=0.40, g=0.48, b=0.51, a=1.00}, -- Base00 (#657b83)
            text_header  = {r=0.71, g=0.54, b=0.00, a=1.00}, -- Yellow (#b58900)
            text_dim     = {r=0.58, g=0.63, b=0.63, a=1.00}, -- Base1  (#93a1a1)
            text_flavor  = {r=0.71, g=0.54, b=0.00, a=0.90}, -- Yellow (#b58900)
            text_label   = {r=0.40, g=0.48, b=0.51, a=1.00}, -- Base00 (#657b83) for Filter:/Tags:

            -- Interactive: Buttons & Inputs
            button_normal   = {r=0.93, g=0.91, b=0.84, a=1.00}, -- Base2 (#eee8d5)
            button_hover    = {r=0.83, g=0.86, b=0.86, a=0.40}, -- Base2 darkened
            button_active   = {r=0.89, g=0.86, b=0.79, a=1.00}, -- Slightly Darker Base3
            button_inactive = {r=0.93, g=0.91, b=0.84, a=0.40}, -- Base2 (Low Opacity)

            -- Interactive Text Colors
            button_text_norm  = {r=0.35, g=0.43, b=0.46, a=1.00}, -- Base01
            button_text_hover = {r=0.00, g=0.17, b=0.21, a=1.00}, -- Base03 (Sharp Black)
            button_text_dis   = {r=0.58, g=0.63, b=0.63, a=0.50}, -- Base1 (Faded)

            -- Semantics
            accent       = {r=0.15, g=0.55, b=0.82, a=1.00}, -- Blue
            success      = {r=0.52, g=0.60, b=0.00, a=1.00}, -- Green
            warning      = {r=0.71, g=0.54, b=0.00, a=1.00}, -- Yellow (#b58900)
            error        = {r=0.86, g=0.20, b=0.18, a=1.00}, -- Red

            -- Goblin tab colors
            currency      = {r=0.71, g=0.54, b=0.00, a=1.00}, -- Solarized Yellow (#b58900) for gold values
            column_header = {r=0.35, g=0.43, b=0.46, a=1.00}, -- Base01 (#586e75) neutral headers

            -- State colors for toggle buttons (light theme - active stands out)
            state_active   = {r=0.73, g=0.88, b=0.86, a=1.00}, -- Cyan-tinted cream (selected)
            state_inactive = {r=0.93, g=0.91, b=0.84, a=1.00}, -- Panel color (Base2)
            state_hover    = {r=0.83, g=0.89, b=0.88, a=1.00}, -- Subtle hover tint

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.40, g=0.48, b=0.51, a=1.00}, -- Known by alt (Base00)
            text_recipe_unknown   = {r=0.58, g=0.63, b=0.63, a=1.00}, -- Not known (Base1)
            text_recipe_no_prof   = {r=0.71, g=0.75, b=0.76, a=1.00}, -- No profession (lighter)

            -- Text shadow for light theme readability
            textShadow = { color = {r=1, g=1, b=1, a=0.8}, offset = {x=1, y=-1} },

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Gruvbox Dark: Warm, retro terminal style
        -- ========================================================================
        GruvboxDark = {
            -- Containers
            bg              = {r=0.16, g=0.16, b=0.16, a=0.95}, -- #282828 (Bg0)
            panel           = {r=0.24, g=0.22, b=0.21, a=1.00}, -- #3c3836 (Bg1)
            panel_header    = {r=0.31, g=0.29, b=0.27, a=1.00}, -- Panel header (Bg2)
            border          = {r=0.31, g=0.29, b=0.27, a=1.00}, -- #504945 (Bg2)

            -- Typography
            text            = {r=0.92, g=0.86, b=0.70, a=1.00}, -- #ebdbb2 (Fg1)
            text_header     = {r=0.98, g=0.95, b=0.78, a=1.00}, -- #fbf1c7 (Fg0)
            text_dim        = {r=0.66, g=0.60, b=0.52, a=1.00}, -- #a89984 (Gray)
            text_flavor     = {r=0.85, g=0.68, b=0.25, a=0.90}, -- Gruvbox Gold (#D9AD40)

            -- Interactive: Buttons
            button_normal   = {r=0.31, g=0.29, b=0.27, a=1.00}, -- #504945 (Bg2)
            button_hover    = {r=0.40, g=0.36, b=0.33, a=1.00}, -- #665c54 (Bg3)
            button_active   = {r=0.11, g=0.13, b=0.13, a=1.00}, -- #1d2021 (Bg0 Hard - Pressed)
            button_inactive = {r=0.24, g=0.22, b=0.21, a=0.50}, -- #3c3836 (50% Opacity)

            -- Interactive Text
            button_text_norm  = {r=0.92, g=0.86, b=0.70, a=1.00}, -- #ebdbb2
            button_text_hover = {r=1.00, g=1.00, b=1.00, a=1.00}, -- White (High Contrast)
            button_text_dis   = {r=0.57, g=0.51, b=0.45, a=1.00}, -- #928374 (Dimmed)

            -- Semantic
            accent          = {r=0.51, g=0.65, b=0.59, a=1.00}, -- #83a598 (Blue)
            success         = {r=0.72, g=0.73, b=0.15, a=1.00}, -- #b8bb26 (Green)
            warning         = {r=0.98, g=0.74, b=0.18, a=1.00}, -- #fabd2f (Yellow)
            error           = {r=0.98, g=0.29, b=0.21, a=1.00}, -- #fb4934 (Red)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.92, g=0.86, b=0.70, a=1.00}, -- Known by alt (Fg1)
            text_recipe_unknown   = {r=0.66, g=0.60, b=0.52, a=1.00}, -- Not known (Gray)
            text_recipe_no_prof   = {r=0.50, g=0.45, b=0.40, a=1.00}, -- No profession (darker)

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Gruvbox Light: Aged paper aesthetic
        -- ========================================================================
        GruvboxLight = {
            isLight      = true,
            -- Containers
            bg              = {r=0.98, g=0.95, b=0.78, a=0.95}, -- #fbf1c7 (Bg0)
            panel           = {r=0.92, g=0.86, b=0.70, a=1.00}, -- #ebdbb2 (Bg1)
            panel_header    = {r=0.84, g=0.77, b=0.63, a=1.00}, -- Panel header (Bg2 - darker)
            border          = {r=0.84, g=0.77, b=0.63, a=1.00}, -- #d5c4a1 (Bg2)

            -- Typography
            text            = {r=0.24, g=0.22, b=0.21, a=1.00}, -- #3c3836 (Fg1)
            text_header     = {r=0.16, g=0.16, b=0.16, a=1.00}, -- #282828 (Fg0)
            text_dim        = {r=0.57, g=0.51, b=0.45, a=1.00}, -- #928374 (Gray)
            text_flavor     = {r=0.71, g=0.54, b=0.00, a=0.90}, -- Gruvbox Yellow (#b58900)

            -- Interactive: Buttons
            button_normal   = {r=0.84, g=0.77, b=0.63, a=1.00}, -- #d5c4a1 (Darker Paper)
            button_hover    = {r=0.74, g=0.68, b=0.58, a=1.00}, -- #bdae93 (Bg3)
            button_active   = {r=0.66, g=0.60, b=0.52, a=1.00}, -- #a89984 (Bg4 - Pressed)
            button_inactive = {r=0.92, g=0.86, b=0.70, a=0.50}, -- #ebdbb2 (50% Opacity)

            -- Interactive Text
            button_text_norm  = {r=0.24, g=0.22, b=0.21, a=1.00}, -- #3c3836
            button_text_hover = {r=0.11, g=0.13, b=0.13, a=1.00}, -- #1d2021 (Almost Black)
            button_text_dis   = {r=0.66, g=0.60, b=0.52, a=1.00}, -- #a89984

            -- Semantic
            accent          = {r=0.03, g=0.40, b=0.47, a=1.00}, -- #076678 (Dark Teal)
            success         = {r=0.60, g=0.59, b=0.10, a=1.00}, -- #98971a (Green)
            warning         = {r=0.84, g=0.60, b=0.13, a=1.00}, -- #d79921 (Dark Yellow)
            error           = {r=0.80, g=0.14, b=0.11, a=1.00}, -- #cc241d (Red)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.24, g=0.22, b=0.21, a=1.00}, -- Known by alt (Fg1)
            text_recipe_unknown   = {r=0.57, g=0.51, b=0.45, a=1.00}, -- Not known (Gray)
            text_recipe_no_prof   = {r=0.66, g=0.60, b=0.52, a=1.00}, -- No profession (lighter)

            -- Text shadow for light theme readability
            textShadow = { color = {r=1, g=1, b=1, a=0.8}, offset = {x=1, y=-1} },

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Everforest Dark (Medium): Deep, swampy, soft.
        -- Best for: Night time, low eye strain.
        -- ========================================================================
        EverforestDark = {
            -- Window & Containers
            bg           = {r=0.18, g=0.21, b=0.23, a=0.95}, -- #2d353b (Bg0)
            panel        = {r=0.20, g=0.25, b=0.27, a=1.00}, -- #343f44 (Bg1)
            panel_header = {r=0.24, g=0.28, b=0.30, a=1.00}, -- Panel header (Bg2 - lighter)
            border       = {r=0.31, g=0.36, b=0.37, a=1.00}, -- #4f585e (Bg3)

            -- Typography
            text         = {r=0.83, g=0.78, b=0.67, a=1.00}, -- #d3c6aa (Fg)
            text_header  = {r=0.90, g=0.85, b=0.72, a=1.00}, -- #e6dfc7 (Pale)
            text_dim     = {r=0.52, g=0.57, b=0.54, a=1.00}, -- #859289 (Grey)
            text_flavor  = {r=0.80, g=0.65, b=0.28, a=0.90}, -- Everforest Gold (#CCA647)

            -- INTERACTIVE: Buttons
            button_normal   = {r=0.24, g=0.28, b=0.30, a=1.00}, -- #3d484d (Bg2)
            button_hover    = {r=0.28, g=0.32, b=0.35, a=1.00}, -- #475258 (Bg3)
            button_active   = {r=0.14, g=0.16, b=0.18, a=1.00}, -- #232a2e (Dim - Pressed)
            button_inactive = {r=0.20, g=0.25, b=0.27, a=0.40}, -- #343f44

            -- Interactive Text
            button_text_norm  = {r=0.83, g=0.78, b=0.67, a=1.00}, -- #d3c6aa
            button_text_hover = {r=1.00, g=1.00, b=1.00, a=1.00}, -- White
            button_text_dis   = {r=0.48, g=0.52, b=0.49, a=1.00}, -- #7a8478

            -- Semantic Accents
            accent       = {r=0.50, g=0.73, b=0.70, a=1.00}, -- #7fbbb3 (Blue)
            success      = {r=0.65, g=0.75, b=0.50, a=1.00}, -- #a7c080 (Green)
            warning      = {r=0.86, g=0.74, b=0.50, a=1.00}, -- #dbbc7f (Yellow)
            error        = {r=0.90, g=0.49, b=0.50, a=1.00}, -- #e67e80 (Red)
            crafting     = {r=0.51, g=0.75, b=0.57, a=1.00}, -- #83c092 (Aqua)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.83, g=0.78, b=0.67, a=1.00}, -- Known by alt (Fg)
            text_recipe_unknown   = {r=0.52, g=0.57, b=0.54, a=1.00}, -- Not known (Grey)
            text_recipe_no_prof   = {r=0.40, g=0.45, b=0.42, a=1.00}, -- No profession (darker)

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Everforest Light (Medium): Warm, earthy, organic.
        -- Best for: Day time, high readability, "Sage/Tan" aesthetic.
        -- ========================================================================
        EverforestLight = {
            isLight      = true,
            -- Window & Containers (warm sage-beige)
            bg           = {r=0.93, g=0.92, b=0.83, a=0.95}, -- #efebd4 (Bg Medium)
            panel        = {r=0.90, g=0.89, b=0.80, a=1.00}, -- #e6e2cc (Bg Dim)
            panel_header = {r=0.85, g=0.84, b=0.75, a=1.00}, -- Panel header (darker)
            border       = {r=0.74, g=0.76, b=0.68, a=1.00}, -- #bdc3af (Grey 2)

            -- Typography
            text         = {r=0.36, g=0.42, b=0.45, a=1.00}, -- #5c6a72 (Fg)
            text_header  = {r=0.29, g=0.34, b=0.36, a=1.00}, -- #4c566a (Darker Slate)
            text_dim     = {r=0.57, g=0.61, b=0.56, a=1.00}, -- #939f91 (Grey 1)
            text_flavor  = {r=0.60, g=0.47, b=0.10, a=0.90}, -- Everforest Light Gold (#997818)

            -- INTERACTIVE: Buttons & Inputs
            button_normal   = {r=0.88, g=0.87, b=0.76, a=1.00}, -- #e0dcc7
            button_hover    = {r=0.99, g=0.96, b=0.89, a=0.60}, -- #fdf6e3
            button_active   = {r=0.83, g=0.81, b=0.71, a=1.00}, -- #d3c6aa
            button_inactive = {r=0.93, g=0.92, b=0.83, a=0.40}, -- #efebd4 (Low Alpha)

            -- Interactive Text
            button_text_norm  = {r=0.36, g=0.42, b=0.45, a=1.00}, -- #5c6a72
            button_text_hover = {r=0.23, g=0.27, b=0.29, a=1.00}, -- #3a454a (Sharper)
            button_text_dis   = {r=0.57, g=0.61, b=0.56, a=1.00}, -- #939f91

            -- Semantic Accents (Warm & Natural)
            accent       = {r=0.23, g=0.58, b=0.77, a=1.00}, -- #3a94c5 (Blue)
            success      = {r=0.55, g=0.63, b=0.00, a=1.00}, -- #8da101 (Green)
            warning      = {r=0.87, g=0.63, b=0.00, a=1.00}, -- #dfa000 (Yellow)
            error        = {r=0.97, g=0.33, b=0.32, a=1.00}, -- #f85552 (Red)
            crafting     = {r=0.21, g=0.65, b=0.49, a=1.00}, -- #35a77c (Aqua - for progress bars)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.36, g=0.42, b=0.45, a=1.00}, -- Known by alt (Fg)
            text_recipe_unknown   = {r=0.57, g=0.61, b=0.56, a=1.00}, -- Not known (Grey 1)
            text_recipe_no_prof   = {r=0.68, g=0.71, b=0.66, a=1.00}, -- No profession (lighter)

            -- Text shadow for light theme readability
            textShadow = { color = {r=1, g=1, b=1, a=0.8}, offset = {x=1, y=-1} },

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Everforest Access: Accessibility-focused dark theme
        -- Based on Everforest Dark with enhanced contrast
        -- ========================================================================
        EverforestAccess = {
            -- Window & Containers
            bg           = {r=0.18, g=0.21, b=0.23, a=0.95}, -- #2d353b (Bg0)
            panel        = {r=0.20, g=0.25, b=0.27, a=1.00}, -- #343f44 (Bg1)
            panel_header = {r=0.24, g=0.28, b=0.30, a=1.00}, -- Panel header (Bg2 - lighter)
            border       = {r=0.31, g=0.36, b=0.37, a=1.00}, -- #4f585e (Bg3)

            -- Typography
            text         = {r=0.83, g=0.78, b=0.67, a=1.00}, -- #d3c6aa (Fg)
            text_header  = {r=0.90, g=0.85, b=0.72, a=1.00}, -- #e6dfc7 (Pale)
            text_dim     = {r=0.52, g=0.57, b=0.54, a=1.00}, -- #859289 (Grey)
            text_flavor  = {r=0.80, g=0.65, b=0.28, a=0.90}, -- Everforest Gold (#CCA647)

            -- INTERACTIVE: Buttons
            button_normal   = {r=0.24, g=0.28, b=0.30, a=1.00}, -- #3d484d (Bg2)
            button_hover    = {r=0.28, g=0.32, b=0.35, a=1.00}, -- #475258 (Bg3)
            button_active   = {r=0.14, g=0.16, b=0.18, a=1.00}, -- #232a2e (Dim - Pressed)
            button_inactive = {r=0.20, g=0.25, b=0.27, a=0.40}, -- #343f44

            -- Interactive Text
            button_text_norm  = {r=0.83, g=0.78, b=0.67, a=1.00}, -- #d3c6aa
            button_text_hover = {r=1.00, g=1.00, b=1.00, a=1.00}, -- White
            button_text_dis   = {r=0.48, g=0.52, b=0.49, a=1.00}, -- #7a8478

            -- Semantic Accents
            accent       = {r=0.50, g=0.73, b=0.70, a=1.00}, -- #7fbbb3 (Blue)
            success      = {r=0.65, g=0.75, b=0.50, a=1.00}, -- #a7c080 (Green)
            warning      = {r=0.86, g=0.74, b=0.50, a=1.00}, -- #dbbc7f (Yellow)
            error        = {r=0.90, g=0.49, b=0.50, a=1.00}, -- #e67e80 (Red)
            crafting     = {r=0.51, g=0.75, b=0.57, a=1.00}, -- #83c092 (Aqua)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.83, g=0.78, b=0.67, a=1.00}, -- Known by alt (Fg)
            text_recipe_unknown   = {r=0.52, g=0.57, b=0.54, a=1.00}, -- Not known (Grey)
            text_recipe_no_prof   = {r=0.40, g=0.45, b=0.42, a=1.00}, -- No profession (darker)

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Kanagawa Dark (Wave): Warm ink blacks
        -- ========================================================================
        KanagawaDark = {
            -- Containers
            bg              = {r=0.12, g=0.12, b=0.16, a=0.95}, -- #1F1F28 (Sumi Ink 1)
            panel           = {r=0.21, g=0.21, b=0.27, a=1.00}, -- #363646 (Sumi Ink 3)
            panel_header    = {r=0.26, g=0.26, b=0.32, a=1.00}, -- Panel header (lighter)
            border          = {r=0.09, g=0.09, b=0.11, a=1.00}, -- #16161D (Sumi Ink 0)

            -- Typography
            text            = {r=0.86, g=0.84, b=0.73, a=1.00}, -- #DCD7BA (Fuji White)
            text_header     = {r=0.90, g=0.80, b=0.65, a=1.00}, -- #E6C384 (Carp Yellow)
            text_dim        = {r=0.45, g=0.44, b=0.41, a=1.00}, -- #727169 (Fuji Gray)
            text_flavor     = {r=0.90, g=0.80, b=0.65, a=0.90}, -- Carp Yellow (#E6CC98)

            -- Interactive: Buttons
            button_normal   = {r=0.16, g=0.16, b=0.22, a=1.00}, -- #2A2A37 (Sumi Ink 2)
            button_hover    = {r=0.22, g=0.22, b=0.29, a=1.00}, -- #39394d (Custom Lighten)
            button_active   = {r=0.09, g=0.09, b=0.11, a=1.00}, -- #16161D (Sumi Ink 0)
            button_inactive = {r=0.21, g=0.21, b=0.27, a=0.40}, -- #363646 (Faded)

            -- Interactive Text
            button_text_norm  = {r=0.86, g=0.84, b=0.73, a=1.00}, -- #DCD7BA
            button_text_hover = {r=0.49, g=0.61, b=0.85, a=1.00}, -- #7E9CD8 (Crystal Blue)
            button_text_dis   = {r=0.33, g=0.33, b=0.43, a=1.00}, -- #54546D

            -- Semantic
            accent          = {r=0.49, g=0.61, b=0.85, a=1.00}, -- #7E9CD8 (Crystal Blue)
            success         = {r=0.46, g=0.58, b=0.42, a=1.00}, -- #76946A (Autumn Green)
            warning         = {r=1.00, g=0.62, b=0.23, a=1.00}, -- #FF9E3B (Ronin Yellow)
            error           = {r=0.91, g=0.14, b=0.14, a=1.00}, -- #E82424 (Samurai Red)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.86, g=0.84, b=0.73, a=1.00}, -- Known by alt (Fuji White)
            text_recipe_unknown   = {r=0.45, g=0.44, b=0.41, a=1.00}, -- Not known (Fuji Gray)
            text_recipe_no_prof   = {r=0.33, g=0.33, b=0.30, a=1.00}, -- No profession (darker)

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Kanagawa Light (Lotus): Elegant parchment
        -- ========================================================================
        KanagawaLight = {
            isLight      = true,
            -- Containers
            bg              = {r=0.95, g=0.93, b=0.74, a=0.95}, -- #f2ecbc (Lotus White 3)
            panel           = {r=0.90, g=0.87, b=0.70, a=1.00}, -- #e5e9f0 (Lotus White 2)
            panel_header    = {r=0.85, g=0.82, b=0.65, a=1.00}, -- Panel header (darker)
            border          = {r=0.54, g=0.54, b=0.50, a=1.00}, -- #8a8980 (Lotus Gray 3)

            -- Typography
            text            = {r=0.33, g=0.33, b=0.39, a=1.00}, -- #545464 (Lotus Ink 1)
            text_header     = {r=0.26, g=0.26, b=0.42, a=1.00}, -- #43436c (Lotus Ink 2)
            text_dim        = {r=0.44, g=0.43, b=0.38, a=1.00}, -- #716e61 (Lotus Gray 2)
            text_flavor     = {r=0.60, g=0.47, b=0.15, a=0.90}, -- Lotus Gold (#997826)

            -- Interactive: Buttons
            button_normal   = {r=0.85, g=0.82, b=0.65, a=1.00}, -- #d5d9c7 (Lotus White 1)
            button_hover    = {r=0.80, g=0.77, b=0.60, a=1.00}, -- Darker Parchment
            button_active   = {r=0.95, g=0.93, b=0.74, a=1.00}, -- #f2ecbc (Recedes into BG)
            button_inactive = {r=0.85, g=0.82, b=0.65, a=0.50}, -- Faded

            -- Interactive Text
            button_text_norm  = {r=0.26, g=0.26, b=0.42, a=1.00}, -- #43436c (Lotus Ink 2)
            button_text_hover = {r=0.00, g=0.00, b=0.00, a=1.00}, -- Black
            button_text_dis   = {r=0.63, g=0.61, b=0.68, a=1.00}, -- #a09cac (Lotus Violet 1)

            -- Semantic
            accent          = {r=0.40, g=0.58, b=0.75, a=1.00}, -- #6693bf (Lotus Teal)
            success         = {r=0.42, g=0.58, b=0.54, a=1.00}, -- #6a9589 (Wave Aqua)
            warning         = {r=0.91, g=0.54, b=0.00, a=1.00}, -- #e98a00 (Lotus Orange 2)
            error           = {r=0.77, g=0.29, b=0.43, a=1.00}, -- #c4746e (Dragon Red)

            -- Recipe list text colors
            text_recipe_known     = {r=0.80, g=0.29, b=0.09, a=1.00}, -- Known by current char (#cb4b16 orange)
            text_recipe_alt       = {r=0.33, g=0.33, b=0.39, a=1.00}, -- Known by alt (Lotus Ink 1)
            text_recipe_unknown   = {r=0.44, g=0.43, b=0.38, a=1.00}, -- Not known (Lotus Gray 2)
            text_recipe_no_prof   = {r=0.54, g=0.54, b=0.50, a=1.00}, -- No profession (Lotus Gray 3)

            -- Text shadow for light theme readability
            textShadow = { color = {r=1, g=1, b=1, a=0.8}, offset = {x=1, y=-1} },

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Accessibility High Contrast: Maximum visibility
        -- Pure black background with neon accents for vision impairment support
        -- ========================================================================
        AccessibilityHC = {
            -- Containers (High Contrast: Pure Black & White Borders)
            bg              = {r=0.00, g=0.00, b=0.00, a=1.00}, -- #000000 (Pure Black)
            panel           = {r=0.00, g=0.00, b=0.00, a=1.00}, -- #000000
            panel_header    = {r=0.12, g=0.12, b=0.12, a=1.00}, -- Panel header (lighter)
            border          = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF (Pure White)

            -- Typography
            text            = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF
            text_header     = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF
            text_dim        = {r=0.70, g=0.70, b=0.70, a=1.00}, -- #B3B3B3
            text_flavor     = {r=1.00, g=0.85, b=0.00, a=0.90}, -- Bright Gold (#FFD900)

            -- Interactive: Buttons
            button_normal   = {r=0.20, g=0.20, b=0.20, a=1.00}, -- #333333
            button_hover    = {r=0.40, g=0.40, b=0.40, a=1.00}, -- #666666
            button_active   = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF (Inverted)
            button_inactive = {r=0.10, g=0.10, b=0.10, a=1.00}, -- #1A1A1A

            -- Interactive Text
            button_text_norm  = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF
            button_text_hover = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF
            button_text_dis   = {r=0.50, g=0.50, b=0.50, a=1.00}, -- #808080

            -- Semantic (Vibrant "Neon" for visibility on Black)
            accent          = {r=0.00, g=1.00, b=1.00, a=1.00}, -- #00FFFF (Cyan)
            success         = {r=0.00, g=1.00, b=0.00, a=1.00}, -- #00FF00 (Lime)
            warning         = {r=1.00, g=1.00, b=0.00, a=1.00}, -- #FFFF00 (Yellow)
            error           = {r=1.00, g=0.20, b=0.20, a=1.00}, -- #FF3333 (Bright Red)

            -- Recipe list text colors (High contrast)
            text_recipe_known     = {r=1.00, g=0.50, b=0.00, a=1.00}, -- Known by current char (Bright Orange)
            text_recipe_alt       = {r=1.00, g=1.00, b=1.00, a=1.00}, -- Known by alt (White)
            text_recipe_unknown   = {r=0.70, g=0.70, b=0.70, a=1.00}, -- Not known (Light Gray)
            text_recipe_no_prof   = {r=0.50, g=0.50, b=0.50, a=1.00}, -- No profession (Gray)

            -- Font Definitions
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "OUTLINE" },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "OUTLINE" },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "OUTLINE" },
            },
        },

        -- ========================================================================
        -- Colorblind Safe: CVD-friendly palette
        -- Based on David Math Logic colorblind-safe palette
        -- All semantic colors distinguishable across deuteranopia, protanopia,
        -- and tritanopia. Uses blue/teal/amber/pink instead of green/red.
        -- ========================================================================
        ColorblindSafe = {
            -- Containers (neutral dark, high contrast base)
            bg              = {r=0.10, g=0.11, b=0.12, a=0.95}, -- #1a1c1e
            panel           = {r=0.14, g=0.15, b=0.16, a=1.00}, -- #232628
            panel_header    = {r=0.18, g=0.19, b=0.20, a=1.00}, -- #2e3133
            border          = {r=0.35, g=0.38, b=0.40, a=1.00}, -- #596166

            -- Typography (WCAG AA+ on dark bg)
            text            = {r=0.89, g=0.91, b=0.94, a=1.00}, -- #e2e8f0 (~12.6:1)
            text_header     = {r=0.96, g=0.97, b=0.98, a=1.00}, -- #f5f8fa (~16:1)
            text_dim        = {r=0.64, g=0.67, b=0.71, a=1.00}, -- #a3abb5 (~5.8:1)
            text_flavor     = {r=1.00, g=0.76, b=0.03, a=0.90}, -- #FFC107 (amber)
            text_label      = {r=0.80, g=0.84, b=0.88, a=1.00}, -- #ccd6e0 (~9.3:1)

            -- Buttons
            button_normal   = {r=0.18, g=0.19, b=0.20, a=1.00}, -- #2e3133
            button_hover    = {r=0.24, g=0.26, b=0.28, a=1.00}, -- #3d4247
            button_active   = {r=0.12, g=0.13, b=0.14, a=1.00}, -- #1f2123
            button_inactive = {r=0.18, g=0.19, b=0.20, a=0.40}, -- #2e3133 @ 40%
            button_text_norm  = {r=0.89, g=0.91, b=0.94, a=1.00}, -- #e2e8f0
            button_text_hover = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #ffffff
            button_text_dis   = {r=0.50, g=0.53, b=0.56, a=1.00}, -- #80878e

            -- Semantic (colorblind-safe palette)
            accent          = {r=0.12, g=0.53, b=0.90, a=1.00}, -- #1E88E5 (Blue)
            success         = {r=0.00, g=0.60, b=0.54, a=1.00}, -- #00998A (Bright Teal)
            warning         = {r=1.00, g=0.76, b=0.03, a=1.00}, -- #FFC107 (Amber)
            error           = {r=0.85, g=0.11, b=0.38, a=1.00}, -- #D81B60 (Deep Pink)
            crafting        = {r=0.12, g=0.53, b=0.90, a=1.00}, -- #1E88E5 (matches accent)

            -- State colors (blue-tinted toggles)
            state_active   = {r=0.08, g=0.40, b=0.62, a=1.00}, -- #146699
            state_inactive = {r=0.18, g=0.19, b=0.20, a=1.00}, -- #2e3133
            state_hover    = {r=0.10, g=0.46, b=0.76, a=1.00}, -- #1a76c2

            -- Recipe status (4 distinguishable states for all CVD types)
            text_recipe_known     = {r=1.00, g=0.76, b=0.03, a=1.00}, -- #FFC107 Amber (current char knows)
            text_recipe_alt       = {r=0.12, g=0.53, b=0.90, a=1.00}, -- #1E88E5 Blue (alt knows)
            text_recipe_unknown   = {r=0.64, g=0.67, b=0.71, a=1.00}, -- #a3abb5 Gray (nobody knows)
            text_recipe_no_prof   = {r=0.50, g=0.53, b=0.56, a=1.00}, -- #80878e Dark Gray (no profession)

            -- Goblin tab
            currency      = {r=1.00, g=0.76, b=0.03, a=1.00}, -- #FFC107 (Amber)
            column_header = {r=0.64, g=0.67, b=0.71, a=1.00}, -- #a3abb5

            -- Font Definitions (matches HousingTheme sizing)
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },

        -- ========================================================================
        -- Housing Theme: Native WoW "Endeavor Tasks" aesthetic
        -- Dark charcoal with bronze/wood trim and Blizzard Gold accents
        -- Uses Blizzard Atlas textures for authentic WoW look
        -- ========================================================================
        HousingTheme = {
            -- Dark theme
            -- Window & Containers
            bg              = {r=0.11, g=0.11, b=0.11, a=0.95}, -- #1c1c1c (Charcoal)
            panel           = {r=0.05, g=0.05, b=0.05, a=0.60}, -- #0d0d0d (Transparent Black)
            panel_header    = {r=0.12, g=0.12, b=0.12, a=0.80}, -- Panel header (lighter)
            border          = {r=0.44, g=0.36, b=0.26, a=1.00}, -- #705c42 (Bronze/Wood)

            -- Atlas Textures (from Blizzard_HousingDashboard)
            atlas = {
                -- Main backgrounds
                background = "housing-dashboard-bg-activity",
                panelBg = "housing-basic-panel--stone-background",
                taskRowBg = "housing-dashboard-initiatives-tasks-listitem-bg",
                taskListBg = "housing-basic-panel--stone-background",
                -- XP/Progress elements
                xpBanner = "housing-dashboard-tasks-listitem-flag",
                fillBarBg = "housing-dashboard-fillbar-bar-bg",
                fillBarFill = "housing-dashboard-fillbar-fill",
                pipComplete = "housing-dashboard-fillbar-pip-complete",
                pipIncomplete = "housing-dashboard-fillbar-pip-incomplete",
                -- Title/Header elements
                titleBarBg = "housing-dashboard-fillbar-bar-bg",
                headerSectionBg = "housing-basic-panel--stone-background",
                sectionHeaderBg = "housing-woodsign",
                sectionLine = "housing-bulletinboard-list-header-decorative-line",
                tabSectionBg = "housing-woodsign",
                -- Decorative
                divider = "housing-dashboard-divider-horz-tile",
                checkmark = "common-icon-checkmark",
                cornerTL = "housing-dashboard-filigree-corner-TL",
                cornerTR = "housing-dashboard-filigree-corner-TR",
                cornerBL = "housing-dashboard-filigree-corner-BL",
                cornerBR = "housing-dashboard-filigree-corner-BR",
                -- Wood sign header (3-part)
                headerLeft = "housing-dashboard-woodsign-left",
                headerCenter = "housing-dashboard-woodsign-center",
                headerRight = "housing-dashboard-woodsign-right",
                -- Timer elements
                timerBg = "housing-dashboard-timertag-bg",
                timerIcon = "housing-dashboard-timertag-clock-icon",
                -- Native UI tabs (proper tab atlases)
                tabActive = "_uiframe-activetab-center",
                tabInactive = "_uiframe-tab-center",
                tabActiveLeft = "uiframe-activetab-left",
                tabActiveRight = "uiframe-activetab-right",
                tabInactiveLeft = "uiframe-tab-left",
                tabInactiveRight = "uiframe-tab-right",
                -- Title backgrounds
                titleWoodSign = "housing-woodsign",
                tabBarWoodSign = "housinguiwoodsign",
                titleBg = "catalog-nav-bg-primary",
                -- Scrollbar & Window
                scrollThumb = "decor-abilitybar-divider",
                windowBorder = "housing-simple-wood-frame",
            },

            -- Typography
            text            = {r=1.00, g=1.00, b=1.00, a=1.00}, -- #FFFFFF (White)
            text_header     = {r=1.00, g=0.82, b=0.00, a=1.00}, -- #FFD100 (Blizzard Gold)
            text_dim        = {r=0.70, g=0.70, b=0.70, a=1.00}, -- #B3B3B3 (Light Grey)
            text_flavor     = {r=1.00, g=0.82, b=0.00, a=0.90}, -- Blizzard Gold (#FFD100)
            text_green      = {r=0.25, g=1.00, b=0.25, a=1.00}, -- #40FF40 (Completed Green)

            -- Interactive: Buttons
            button_normal   = {r=0.15, g=0.15, b=0.15, a=0.80}, -- Dark Grey
            button_hover    = {r=0.25, g=0.25, b=0.25, a=0.80}, -- Lighter Grey
            button_active   = {r=0.10, g=0.10, b=0.10, a=1.00}, -- Darker on press
            button_inactive = {r=0.15, g=0.15, b=0.15, a=0.40}, -- Faded

            -- Interactive Text
            button_text_norm  = {r=1.00, g=1.00, b=1.00, a=1.00}, -- White
            button_text_hover = {r=1.00, g=0.82, b=0.00, a=1.00}, -- Blizzard Gold
            button_text_dis   = {r=0.50, g=0.50, b=0.50, a=1.00}, -- Grey

            -- Header Bar (Wood texture background)
            header_bar      = {r=0.27, g=0.18, b=0.11, a=1.00}, -- #452e1c (Dark Wood)

            -- Semantic Accents
            accent          = {r=1.00, g=0.82, b=0.00, a=1.00}, -- Blizzard Gold
            success         = {r=0.25, g=1.00, b=0.25, a=1.00}, -- Completed Green
            warning         = {r=1.00, g=0.60, b=0.00, a=1.00}, -- Orange
            error           = {r=1.00, g=0.25, b=0.25, a=1.00}, -- Red

            -- Recipe list text colors
            text_recipe_known     = {r=1.00, g=0.82, b=0.00, a=1.00}, -- Known by current char (#FFD100 Blizzard Gold)
            text_recipe_alt       = {r=1.00, g=1.00, b=1.00, a=1.00}, -- Known by alt (White)
            text_recipe_unknown   = {r=0.70, g=0.70, b=0.70, a=1.00}, -- Not known (Light Grey)
            text_recipe_no_prof   = {r=0.50, g=0.50, b=0.50, a=1.00}, -- No profession (Grey)

            -- Font Definitions (FRIZQT for both header and body)
            fonts = {
                header = { file = "Fonts\\FRIZQT__.TTF", size = 14, flags = "", shadow = true },
                body   = { file = "Fonts\\FRIZQT__.TTF", size = 12, flags = "", shadow = true },
                small  = { file = "Fonts\\ARIALN.TTF",   size = 10, flags = "", shadow = true },
            },
        },
}

-- Merge shared schemes if available (VE loaded), preserving HDG-specific schemes like HDGDefault
if VAMOOSE_SchemeConstants then
    for themeName, scheme in pairs(VAMOOSE_SchemeConstants) do
        if not HDG.Colors.Schemes[themeName] then
            HDG.Colors.Schemes[themeName] = scheme
        end
    end
end

-- Helper to get current scheme
function HDG.Colors:GetScheme(themeName)
    themeName = themeName or (HDG.Store and HDG.Store:GetState().config.theme) or "SolarizedDark"
    return self.Schemes[themeName] or self.Schemes.SolarizedDark
end

-- Helper to cycle to next theme
function HDG.Colors:GetNextTheme(currentTheme)
    for i, theme in ipairs(self.ThemeOrder) do
        if theme == currentTheme then
            local nextIndex = (i % #self.ThemeOrder) + 1
            return self.ThemeOrder[nextIndex]
        end
    end
    return self.ThemeOrder[1]
end

-- Helper to cycle to previous theme
function HDG.Colors:GetPreviousTheme(currentTheme)
    for i, theme in ipairs(self.ThemeOrder) do
        if theme == currentTheme then
            local prevIndex = ((i - 2) % #self.ThemeOrder) + 1
            return self.ThemeOrder[prevIndex]
        end
    end
    return self.ThemeOrder[#self.ThemeOrder]
end
