import SwiftUI // MARK: - Design Tokens matching the WebOS dark interface enum VelocityTheme { // ── Backgrounds ────────────────────────────────── /// True black app background static let background = Color(red: 0.00, green: 0.00, blue: 0.00) /// Dark surface (#131418) static let surface = Color(red: 0.074, green: 0.078, blue: 0.094) /// Slightly lighter surface (#181b20) static let surface2 = Color(red: 0.095, green: 0.106, blue: 0.125) /// Card surface (#22262e) static let surface3 = Color(red: 0.133, green: 0.149, blue: 0.180) /// Sidebar background (#0B0D10) static let sidebarBg = Color(red: 0.043, green: 0.051, blue: 0.063) // ── Foreground ──────────────────────────────────── static let foreground = Color(white: 0.96) static let mutedFg = Color(red: 0.580, green: 0.620, blue: 0.710) static let subtleFg = Color(red: 0.35, green: 0.38, blue: 0.44) // ── Accent: Blue (#3b82f6) ──────────────────────── static let accent = Color(red: 0.231, green: 0.510, blue: 0.965) static let accentDim = Color(red: 0.160, green: 0.388, blue: 0.820) static let accentSubtle = Color(red: 0.231, green: 0.510, blue: 0.965).opacity(0.15) // ── Semantic ────────────────────────────────────── static let success = Color(red: 0.290, green: 0.780, blue: 0.290) static let warning = Color(red: 0.980, green: 0.745, blue: 0.141) static let danger = Color(red: 0.973, green: 0.267, blue: 0.267) // ── Borders ─────────────────────────────────────── static let borderSubtle = Color.white.opacity(0.07) static let borderAccent = Color(red: 0.231, green: 0.510, blue: 0.965).opacity(0.18) } // MARK: - Glass card modifier struct GlassCard: ViewModifier { var cornerRadius: CGFloat = 16 func body(content: Content) -> some View { content .background( RoundedRectangle(cornerRadius: cornerRadius) .fill(Color(red: 0.031, green: 0.039, blue: 0.071).opacity(0.82)) .overlay( RoundedRectangle(cornerRadius: cornerRadius) .stroke(VelocityTheme.borderAccent, lineWidth: 1) ) .shadow(color: .black.opacity(0.55), radius: 16, y: 4) ) } } extension View { func glassCard(cornerRadius: CGFloat = 16) -> some View { self.modifier(GlassCard(cornerRadius: cornerRadius)) } }