// Auto-generated from bytelyst.tokens.json — do not edit manually.
// Product: chronomind
// Regenerate: cd packages/design-tokens && tsx scripts/generate.ts

import SwiftUI

enum CMColors {
    // MARK: - Semantic (Dark Theme)
    static let bgCanvas = Color(hex: 0x06070A)
    static let bgElevated = Color(hex: 0x0E1118)
    static let surfaceCard = Color(hex: 0x121725)
    static let surfaceMuted = Color(hex: 0x1A2335)
    static let textPrimary = Color(hex: 0xEFF4FF)
    static let textSecondary = Color(hex: 0xA5B1C7)
    static let textTertiary = Color(hex: 0x6C7C98)
    static let accentPrimary = Color(hex: 0x5A8CFF)
    static let accentSecondary = Color(hex: 0x2EE6D6)
    static let success = Color(hex: 0x34D399)
    static let warning = Color(hex: 0xF59E0B)
    static let danger = Color(hex: 0xFF6E6E)

    // MARK: - Chronomind Product Colors
    static let urgencyCritical = Color(hex: 0xFF6E6E)
    static let urgencyImportant = Color(hex: 0xFFD166)
    static let urgencyStandard = Color(hex: 0x5A8CFF)
    static let urgencyGentle = Color(hex: 0x34D399)
    static let urgencyPassive = Color(hex: 0xA5B1C7)
    static let focusMode = Color(hex: 0x7C6BFF)
    static let pomodoroWork = Color(hex: 0x34D399)
    static let pomodoroBreak = Color(hex: 0x5A8CFF)
    static let cascadeWarning = Color(hex: 0xFF9F43)
    static let timerComplete = Color(hex: 0x34D399)

}

enum CMColorsLight {
    // MARK: - Semantic (Light Theme)
    static let bgCanvas = Color(hex: 0xF6F8FC)
    static let bgElevated = Color(hex: 0xEEF2FA)
    static let surfaceCard = Color(hex: 0xFFFFFF)
    static let surfaceMuted = Color(hex: 0xF3F5FA)
    static let textPrimary = Color(hex: 0x0E1320)
    static let textSecondary = Color(hex: 0x55637A)
    static let textTertiary = Color(hex: 0x6C7C98)
    static let accentPrimary = Color(hex: 0x5A8CFF)
    static let accentSecondary = Color(hex: 0x2EE6D6)
    static let success = Color(hex: 0x13956A)
    static let warning = Color(hex: 0xB87504)
    static let danger = Color(hex: 0xD24242)
}

enum CMSpacing {
    static let x0:  CGFloat = 0
    static let x1:  CGFloat = 4
    static let x2:  CGFloat = 8
    static let x3:  CGFloat = 12
    static let x4:  CGFloat = 16
    static let x5:  CGFloat = 20
    static let x6:  CGFloat = 24
    static let x7:  CGFloat = 28
    static let x8:  CGFloat = 32
    static let x10: CGFloat = 40
    static let x12: CGFloat = 48
    static let x16: CGFloat = 64
}

enum CMRadius {
    static let xs: CGFloat = 8
    static let sm: CGFloat = 12
    static let md: CGFloat = 16
    static let lg: CGFloat = 20
    static let xl: CGFloat = 24
    static let pill: CGFloat = 999
}

enum CMMotion {
    static let instant: Double = 0.07
    static let fast: Double = 0.14
    static let base: Double = 0.22
    static let slow: Double = 0.32
}

// MARK: - Color Hex Extension (import if not already defined)

extension Color {
    init(hex: UInt, alpha: Double = 1.0) {
        self.init(
            .sRGB,
            red:   Double((hex >> 16) & 0xFF) / 255.0,
            green: Double((hex >> 8)  & 0xFF) / 255.0,
            blue:  Double(hex & 0xFF) / 255.0,
            opacity: alpha
        )
    }
}
