{
  "version": "2.6",
  "children": [
    {
      "type": "frame",
      "id": "BarcodeScanDialog",
      "name": "Dialog/BarcodeScan",
      "reusable": true,
      "width": 400,
      "height": 600,
      "fill": "$bg-elevated",
      "cornerRadius": 24,
      "layout": "vertical",
      "clip": true,
      "children": [
        {
          "type": "frame",
          "id": "ScanHeader",
          "width": "fill_container",
          "padding": [20, 24],
          "stroke": {"thickness": 1, "fill": "$border-subtle", "sides": ["bottom"]},
          "justifyContent": "space_between",
          "alignItems": "center",
          "children": [
            {"type": "text", "id": "ScanTitle", "fill": "$text-primary", "content": "Quét mã vạch", "fontFamily": "Roboto", "fontSize": 18, "fontWeight": "700"},
            {"type": "frame", "id": "ScanCloseBtn", "width": 36, "height": 36, "fill": "$bg-interactive", "cornerRadius": 18, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "icon_font", "id": "ScanCloseIcon", "width": 18, "height": 18, "iconFontName": "x", "iconFontFamily": "lucide", "fill": "$text-secondary"}
            ]}
          ]
        },
        {
          "type": "frame",
          "id": "ScanContent",
          "width": "fill_container",
          "height": "fill_container",
          "padding": 24,
          "layout": "vertical",
          "gap": 20,
          "alignItems": "center",
          "children": [
            {"type": "frame", "id": "ScanViewfinder", "width": 280, "height": 200, "fill": "$bg-page", "cornerRadius": 16, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "frame", "id": "ScanCornerTL", "width": 40, "height": 40, "x": 20, "y": 20, "stroke": {"thickness": 3, "fill": "$orange-primary", "sides": ["top", "left"]}, "cornerRadius": 4},
              {"type": "frame", "id": "ScanCornerTR", "width": 40, "height": 40, "x": 220, "y": 20, "stroke": {"thickness": 3, "fill": "$orange-primary", "sides": ["top", "right"]}, "cornerRadius": 4},
              {"type": "frame", "id": "ScanCornerBL", "width": 40, "height": 40, "x": 20, "y": 140, "stroke": {"thickness": 3, "fill": "$orange-primary", "sides": ["bottom", "left"]}, "cornerRadius": 4},
              {"type": "frame", "id": "ScanCornerBR", "width": 40, "height": 40, "x": 220, "y": 140, "stroke": {"thickness": 3, "fill": "$orange-primary", "sides": ["bottom", "right"]}, "cornerRadius": 4},
              {"type": "frame", "id": "ScanLine", "width": 240, "height": 2, "fill": "$orange-primary"}
            ]},
            {"type": "frame", "id": "ScanResult", "width": "fill_container", "fill": "#22C55E15", "cornerRadius": 14, "padding": 16, "gap": 14, "alignItems": "center", "children": [
              {"type": "frame", "id": "ScanResultIcon", "width": 48, "height": 48, "fill": "#22C55E20", "cornerRadius": 12, "justifyContent": "center", "alignItems": "center", "children": [
                {"type": "icon_font", "id": "ScanResultIconInner", "width": 24, "height": 24, "iconFontName": "check-circle", "iconFontFamily": "lucide", "fill": "#22C55E"}
              ]},
              {"type": "frame", "id": "ScanResultInfo", "width": "fill_container", "layout": "vertical", "gap": 4, "children": [
                {"type": "text", "id": "ScanResultName", "fill": "$text-primary", "content": "Trà sữa trân châu đen", "fontFamily": "Roboto", "fontSize": 16, "fontWeight": "600"},
                {"type": "frame", "id": "ScanResultMeta", "gap": 12, "alignItems": "center", "children": [
                  {"type": "text", "id": "ScanResultSKU", "fill": "$text-tertiary", "content": "8936012345678", "fontFamily": "Roboto Mono", "fontSize": 12, "fontWeight": "normal"},
                  {"type": "text", "id": "ScanResultPrice", "fill": "#22C55E", "content": "35,000₫", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "700"}
                ]}
              ]}
            ]},
            {"type": "frame", "id": "ScanManualSection", "width": "fill_container", "layout": "vertical", "gap": 10, "children": [
              {"type": "text", "id": "ScanManualLabel", "fill": "$text-tertiary", "content": "Hoặc nhập mã thủ công", "fontFamily": "Roboto", "fontSize": 13, "fontWeight": "normal", "textAlign": "center"},
              {"type": "frame", "id": "ScanManualInput", "width": "fill_container", "height": 48, "fill": "$bg-page", "cornerRadius": 12, "stroke": {"thickness": 1, "fill": "$border-default"}, "padding": [0, 14], "gap": 10, "alignItems": "center", "children": [
                {"type": "icon_font", "id": "ScanManualIcon", "width": 18, "height": 18, "iconFontName": "keyboard", "iconFontFamily": "lucide", "fill": "$text-tertiary"},
                {"type": "text", "id": "ScanManualPlaceholder", "fill": "$text-tertiary", "content": "Nhập mã vạch hoặc SKU...", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "normal"}
              ]}
            ]}
          ]
        },
        {
          "type": "frame",
          "id": "ScanFooter",
          "width": "fill_container",
          "padding": [16, 24],
          "stroke": {"thickness": 1, "fill": "$border-subtle", "sides": ["top"]},
          "children": [
            {"type": "frame", "id": "ScanAddBtn", "width": "fill_container", "height": 52, "fill": {"type": "gradient", "gradientType": "linear", "enabled": true, "rotation": 135, "size": {"height": 1}, "colors": [{"color": "#22C55E", "position": 0}, {"color": "#16A34A", "position": 1}]}, "cornerRadius": 12, "gap": 8, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "icon_font", "id": "ScanAddIcon", "width": 20, "height": 20, "iconFontName": "plus", "iconFontFamily": "lucide", "fill": "$text-primary"},
              {"type": "text", "id": "ScanAddText", "fill": "$text-primary", "content": "Thêm vào đơn hàng", "fontFamily": "Roboto", "fontSize": 15, "fontWeight": "600"}
            ]}
          ]
        }
      ]
    }
  ],
  "variables": {
    "bg-elevated": {"type": "color", "value": "#1A1A1D"},
    "bg-interactive": {"type": "color", "value": "#2A2A2E"},
    "bg-page": {"type": "color", "value": "#0A0A0B"},
    "border-default": {"type": "color", "value": "#2A2A2E"},
    "border-subtle": {"type": "color", "value": "#1F1F23"},
    "orange-primary": {"type": "color", "value": "#FF5C00"},
    "text-primary": {"type": "color", "value": "#FFFFFF"},
    "text-secondary": {"type": "color", "value": "#ADADB0"},
    "text-tertiary": {"type": "color", "value": "#8B8B90"}
  }
}
